Docker & Firewall · Bezpłatnie · Bez rejestracji
Docker Bypassing UFW: Check & Fix Exposed Ports
Understand why UFW status "active" does not block Docker published ports and bind databases safely to 127.0.0.1.
Live Skaner OSINT Privanode (Check Domain Perimeter)
Wpisz domenę (np. e.g. api.yourserver.com), wykonaj 100% pasywny audyt OSINT na żądanie właściciela domeny i pobierz bezpłatny raport PDF na e-mail.
Zgodność prawna: pasywna analiza publicznych rekordów (RODO, art. 267 KK, § 3 Regulaminu). Zero testów inwazyjnych.
Bind Database Ports to Loopback Only
By default, "5432:5432" binds to 0.0.0.0. Always prefix internal ports with 127.0.0.1 or keep them on an internal Docker bridge network.
ports:
- "127.0.0.1:5432:5432"
Często zadawane pytania
Why does Docker bypass UFW on Ubuntu?
Docker writes DNAT rules directly into iptables PREROUTING and DOCKER chains, routing published ports before UFW INPUT rules apply.
What is the safest fix in docker-compose.yml?
Bind internal services like Postgres or Redis to localhost ("127.0.0.1:5432:5432") or remove ports: altogether when only sibling containers need access.
Verify your server perimeter after every deploy
Run a non-invasive external check and monitor SSL, DNS, and exposed services continuously.
Start 14-day Pro Trial (no card) Agency Plan — 50 client domains