Last active
December 18, 2019 06:48
-
-
Save nuga99/3c9f281022f666de867c4a5b19defb20 to your computer and use it in GitHub Desktop.
Iptables Configuration for Dockerize App
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
echo "{ | |
\"iptables\": false | |
}" > /etc/docker/daemon.json | |
sed -i -e 's/DEFAULT_FORWARD_POLICY="DROP"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw | |
ufw reload | |
iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment