Created
October 13, 2018 09:04
-
-
Save Fohlen/8cefee5d6e537a7b461568e07a13b9df to your computer and use it in GitHub Desktop.
Docker+ufw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put in /etc/ufw/after.rules | |
# Put Docker behind UFW | |
*filter | |
:DOCKER-USER - [0:0] | |
:ufw-user-input - [0:0] | |
-A DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
-A DOCKER-USER -m conntrack --ctstate INVALID -j DROP | |
-A DOCKER-USER -i eth0 -j ufw-user-input | |
-A DOCKER-USER -i eth0 -j DROP | |
COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment