commit
3d2259125b
@ -87,7 +87,7 @@ Modify the UFW configuration file `/etc/ufw/after.rules` and add the following r
|
|||||||
COMMIT
|
COMMIT
|
||||||
# END UFW AND DOCKER
|
# END UFW AND DOCKER
|
||||||
|
|
||||||
Using command `sudo systemctl restart ufw** to restart UFW after changing the file. Now the public network can't access any published docker ports, the container and the private network can visit each other normally, and the containers can also access the external network from inside. **There may be some unknown reasons cause the UFW rules will not take effect after restart UFW, please reboot servers. **
|
Using command `sudo systemctl restart ufw` or `sudo ufw reload` to restart UFW after changing the file. Now the public network can't access any published docker ports, the container and the private network can visit each other normally, and the containers can also access the external network from inside. **There may be some unknown reasons cause the UFW rules will not take effect after restart UFW, please reboot servers.**
|
||||||
|
|
||||||
If you want to allow public networks to access the services provided by the Docker container, for example, the service port of a container is `80`. Run the following command to allow the public networks to access this service:
|
If you want to allow public networks to access the services provided by the Docker container, for example, the service port of a container is `80`. Run the following command to allow the public networks to access this service:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user