Skip to content

Instantly share code, notes, and snippets.

View hericlesbitencourt's full-sized avatar

Hericles Bitencourt hericlesbitencourt

View GitHub Profile
@hericlesbitencourt
hericlesbitencourt / docker-iptables.md
Created April 17, 2025 01:34 — forked from viperey/docker-iptables.md
A brief how-to deal with docker and iptables

Dockers and iptables.

The first thing when you come to this topic is that when it comes to iptables, docker just behaves like a spoiled child that takes what (s)he want, although the child is been banned to do so.

In other words, as you may already know, by default, docker ignores any pre-existing iptables' rules when adding its own Chain in the tables. The result of this is a useless firewall when it comes to protecting the access to your services hosted in containers.

Tell me how you almost screw up

So, at the office, at the moment we had this problem we were migrating our projects into containers.