Last active
December 5, 2018 14:47
-
-
Save BirkhoffLee/7ad80bf0b17b2af03ca604b8b69fed57 to your computer and use it in GitHub Desktop.
CentOS firewalld + Docker companion
This file contains hidden or 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
cp /etc/docker/daemon.json /etc/docker/daemon.json.old | |
echo '{"iptables": false}' > /etc/docker/daemon.json | |
firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -o eth0 -j MASQUERADE # this enables containers access outside internet | |
firewall-cmd --reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment