Last active
November 24, 2021 16:54
-
-
Save ThePrincelle/2bc3c1a4cad98376605ffe371ebb97e6 to your computer and use it in GitHub Desktop.
iptables & docker
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
iptables -I DOCKER-USER -i <interface_ext> -j DROP | |
iptables -I DOCKER-USER -m state --state RELATED,ESTABLISHED -j ACCEPT | |
# Just in case there is a Traefik instance or to add a specific port | |
iptables -I DOCKER-USER -i <interface_ext> -p tcp --dport 80 -j ACCEPT | |
iptables -I DOCKER-USER -i <interface_ext> -p tcp --dport 443 -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment