Created
November 14, 2020 20:28
-
-
Save reytech-dev/424f175223c62043c85e2b5fbd61e037 to your computer and use it in GitHub Desktop.
Docker networking with firewalld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: https://stackoverflow.com/questions/40214617/docker-no-route-to-host | |
# Firewalld settings | |
1. open all IPs starts with "172" so that all the containers may communicate each other | |
```shell | |
$ sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family=ipv4 source address=172.0.0.0/8 accept' | |
``` | |
2. make our container able to visit the network outside | |
```shell | |
$ sudo firewall-cmd --permanent --zone=public --add-masquerade | |
``` | |
3. apply the change | |
```shell | |
$ sudo firewall-cmd --reload | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment