Docker IP Forwarding

By default Docker on Linux enables ip_forwarding when it boots up but it doesn’t modify config value in sysctl file. Whenever you run sysctl -p to reload values form file it will override Docker-applied configuration and as a result your containers will lose access to the network.

There are multiple methods on how to re-enable it. Simplest thing is to do it on runtime:

sudo echo 1 > /proc/sys/net/ipv4/ip_forward

or… you can restart docker daemon