mirror of https://github.com/docker/docs.git
Merge pull request #10113 from imreFitos/master
docs: remove NAT rule when removing bridge
This commit is contained in:
commit
e04cc93a2c
|
@ -687,6 +687,7 @@ stopping the service and removing the interface:
|
||||||
$ sudo service docker stop
|
$ sudo service docker stop
|
||||||
$ sudo ip link set dev docker0 down
|
$ sudo ip link set dev docker0 down
|
||||||
$ sudo brctl delbr docker0
|
$ sudo brctl delbr docker0
|
||||||
|
$ sudo iptables -t nat -F POSTROUTING
|
||||||
|
|
||||||
Then, before starting the Docker service, create your own bridge and
|
Then, before starting the Docker service, create your own bridge and
|
||||||
give it whatever configuration you want. Here we will create a simple
|
give it whatever configuration you want. Here we will create a simple
|
||||||
|
@ -713,6 +714,15 @@ illustrate the technique.
|
||||||
$ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker
|
$ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker
|
||||||
$ sudo service docker start
|
$ sudo service docker start
|
||||||
|
|
||||||
|
# Confirming new outgoing NAT masquerade is set up
|
||||||
|
|
||||||
|
$ sudo iptables -t nat -L -n
|
||||||
|
...
|
||||||
|
Chain POSTROUTING (policy ACCEPT)
|
||||||
|
target prot opt source destination
|
||||||
|
MASQUERADE all -- 192.168.5.0/24 0.0.0.0/0
|
||||||
|
|
||||||
|
|
||||||
The result should be that the Docker server starts successfully and is
|
The result should be that the Docker server starts successfully and is
|
||||||
now prepared to bind containers to the new bridge. After pausing to
|
now prepared to bind containers to the new bridge. After pausing to
|
||||||
verify the bridge's configuration, try creating a container — you will
|
verify the bridge's configuration, try creating a container — you will
|
||||||
|
|
Loading…
Reference in New Issue