Ubuntu 20 -> 22 upgrade, iptables issue

There’s a github thread, but hoping to get more help here.

Basically my issue is that upgrading from Ubuntu 20 to Ubuntu 22 (problem not present on a fresh install of Ubuntu 22, curiously) I find that

  1. Docker doesn’t start (which moving to iptables-legacy fixes)
  2. Docker can’t find ports, complaining the command --to-destination in iptables doesn’t exist anymore. Example output below

I imagine this is because iptables-legacy is still a relatively new version of iptables, whereas Docker might be issuing iptables commands that are deprecated? I have no idea. Just wondering if there’s something that can be done to fix it.

(venv) alan@starlabs:~$ docker run -d -p 5566:5566 -p 4444:4444 --env tors=25 mattes/rotating-proxy


docker: Error response from daemon: driver failed programming external connectivity on endpoint jovial_stonebraker (0c198a8b5cf8bea778c2c9569711aea20dcbaff3d68713baa37d13a1acb96123): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5566 -j DNAT --to-destination ! -i docker0: iptables v1.8.7 (legacy): unknown option “–to-destination”