Skip to content

Instantly share code, notes, and snippets.

@otuva
Created August 22, 2025 16:09
Show Gist options
  • Save otuva/1a63a1b9c678f9770e7df7d905718613 to your computer and use it in GitHub Desktop.
Save otuva/1a63a1b9c678f9770e7df7d905718613 to your computer and use it in GitHub Desktop.
sudo iptables -I DOCKER ! -s ipyouwanttoallow -j DROP
sudo iptables -I DOCKER -s localipofyourcontainer -d 0.0.0.0/0 -j ACCEPT
sudo iptables -I DOCKER -m state --state ESTABLISHED,RELATED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment