Blame
|
1 | # Iptables |
||||||
| 2 | ||||||||
| 3 | #### Block Outside Access to Docker But Allow localhost |
|||||||
| 4 | Without the `-m state` rule above the `DROP` rule, outside access is blocked, but traffic initiated from docker won't return. |
|||||||
| 5 | ||||||||
| 6 | -A DOCKER-USER -m state --state RELATED,ESTABLISHED -j ACCEPT |
|||||||
| 7 | -A DOCKER-USER ! -s 127.0.0.1/32 -i eth0 -j DROP |
|||||||