Forráskód Böngészése

docs: remove NAT rule when removing bridge

Signed-off-by: imre Fitos <imre.fitos+github@gmail.com>
imre Fitos 10 éve
szülő
commit
d10d0e568e
1 módosított fájl, 9 hozzáadás és 0 törlés
  1. 9 0
      docs/sources/articles/networking.md

+ 9 - 0
docs/sources/articles/networking.md

@@ -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
@@ -708,6 +709,14 @@ illustrate the technique.
         inet 192.168.5.1/24 scope global bridge0
         inet 192.168.5.1/24 scope global bridge0
            valid_lft forever preferred_lft forever
            valid_lft forever preferred_lft forever
 
 
+    # Confirming outgoing NAT masquerade is setup
+
+    $ 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
+
     # Tell Docker about it and restart (on Ubuntu)
     # Tell Docker about it and restart (on Ubuntu)
 
 
     $ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker
     $ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker