You need to set the proper parameters on your host. You can also set some sysctl on the container itself, but the scope will be limited to the container itself.Note: Not all sysctls are namespaced. Docker does not support changing sysctls inside of a container that also modify the host system. As the kernel evolves we expect to see more sysctls become namespaced.
$ docker run --sysctl net.ipv4.ip_forward=1 someimage