Skip to content

Instantly share code, notes, and snippets.

@ThePrincelle
Last active November 24, 2021 16:54
Show Gist options
  • Save ThePrincelle/2bc3c1a4cad98376605ffe371ebb97e6 to your computer and use it in GitHub Desktop.
Save ThePrincelle/2bc3c1a4cad98376605ffe371ebb97e6 to your computer and use it in GitHub Desktop.
iptables & docker
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