Skip to content

Commit

Permalink
Add docs for ip-forward
Browse files Browse the repository at this point in the history
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
  • Loading branch information
hqhq committed Jun 3, 2015
1 parent 63823cd commit 85fffe1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/man/docker.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ unix://[/path/to/socket] to use.
Default IP address to use when binding container ports. Default is `0.0.0.0`.

**--ip-forward**=*true*|*false*
Docker will enable IP forwarding. Default is true. If `--fixed-cidr-v6` is set. IPv6 forwarding will be activated, too. This may reject Router Advertisements and interfere with the host's existing IPv6 configuration. For more information please consult the documentation about "Advanced Networking - IPv6".
Enables IP forwarding on the Docker host. The default is `true`. This flag interacts with the IP forwarding setting on your host system's kernel. If your system has IP forwarding disabled, this setting enables it. If your system has IP forwarding enabled, setting this flag to `--ip-forward=false` has no effect.

This setting will also enable IPv6 forwarding if you have both `--ip-forward=true` and `--fixed-cidr-v6` set. Note that this may reject Router Advertisements and interfere with the host's existing IPv6 configuration. For more information, please consult the documentation about "Advanced Networking - IPv6".

**--ip-masq**=*true*|*false*
Enable IP masquerading for bridge's IP range. Default is true.
Expand Down
4 changes: 3 additions & 1 deletion docs/sources/articles/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ Whether a container can talk to the world is governed by two factors.
containers if this parameter is `1`. Usually you will simply leave
the Docker server at its default setting `--ip-forward=true` and
Docker will go set `ip_forward` to `1` for you when the server
starts up. To check the setting or turn it on manually:
starts up. If you set `--ip-forward=false` and your system's kernel
has it enabled, the `--ip-forward=false` option has no effect.
To check the setting on your kernel or to turn it on manually:

$ sysctl net.ipv4.conf.all.forwarding
net.ipv4.conf.all.forwarding = 0
Expand Down

0 comments on commit 85fffe1

Please sign in to comment.