docs: remove NAT rule when removing bridge
| ... | ... |
@@ -687,6 +687,7 @@ stopping the service and removing the interface: |
| 687 | 687 |
$ sudo service docker stop |
| 688 | 688 |
$ sudo ip link set dev docker0 down |
| 689 | 689 |
$ sudo brctl delbr docker0 |
| 690 |
+ $ sudo iptables -t nat -F POSTROUTING |
|
| 690 | 691 |
|
| 691 | 692 |
Then, before starting the Docker service, create your own bridge and |
| 692 | 693 |
give it whatever configuration you want. Here we will create a simple |
| ... | ... |
@@ -713,6 +714,15 @@ illustrate the technique. |
| 713 | 713 |
$ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker |
| 714 | 714 |
$ sudo service docker start |
| 715 | 715 |
|
| 716 |
+ # Confirming new outgoing NAT masquerade is set up |
|
| 717 |
+ |
|
| 718 |
+ $ sudo iptables -t nat -L -n |
|
| 719 |
+ ... |
|
| 720 |
+ Chain POSTROUTING (policy ACCEPT) |
|
| 721 |
+ target prot opt source destination |
|
| 722 |
+ MASQUERADE all -- 192.168.5.0/24 0.0.0.0/0 |
|
| 723 |
+ |
|
| 724 |
+ |
|
| 716 | 725 |
The result should be that the Docker server starts successfully and is |
| 717 | 726 |
now prepared to bind containers to the new bridge. After pausing to |
| 718 | 727 |
verify the bridge's configuration, try creating a container — you will |