Skip to content

Instantly share code, notes, and snippets.

@rehmatworks
Created September 8, 2021 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rehmatworks/7dcf98c10be47f522ac842bc406c8ca7 to your computer and use it in GitHub Desktop.
Save rehmatworks/7dcf98c10be47f522ac842bc406c8ca7 to your computer and use it in GitHub Desktop.
Disallow eth0 traffic for Docker Swarm container
iptables -I DOCKER-USER -i eth0 -j DROP
iptables -I DOCKER-USER -m state --state RELATED,ESTABLISHED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment