User Tools

Site Tools


software:docker

This is an old revision of the document!


Docker

Fixes

Broken bridge with KVM (or anything else)

Docker sets a lot of automatic rules in your iptables. If you use a network bridge on your Linux box, you may want to change add an additional rule to avoid traffic generated on your bridge from being discarded by Docker.

$ EDITOR=vim sudo -E systemctl edit docker
[Service]
ExecStartPre=if [ /usr/sbin/iptables -C FORWARD -i br0 -j ACCEPT ]; then true; else /usr/sbin/iptables -I FORWARD -i br0 -j ACCEPT; fi
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

Remember to adjust your iptables path according to the distro you are using.

More details and credit here and here

software/docker.1593811592.txt · Last modified: (external edit)