Last active
February 4, 2022 08:03
-
-
Save shaohme/0c276fd4032e7703bc4596b46e9358ac to your computer and use it in GitHub Desktop.
nft
This file contains 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
#!/sbin/nft -f | |
flush ruleset | |
table inet filter { | |
chain input { | |
type filter hook input priority 0; policy drop; | |
ct state 0x1 drop | |
ct state { 0x2, 0x4 } accept | |
iifname "br-*" accept | |
iifname "docker*" accept | |
iif "lo" accept | |
iif != "lo" ip daddr 127.0.0.0/8 drop | |
iif != "lo" ip6 daddr ::1 drop | |
ip protocol 1 accept | |
ip6 nexthdr 58 accept | |
} | |
chain forward { | |
type filter hook forward priority 0; policy accept; | |
} | |
chain output { | |
type filter hook output priority 0; policy accept; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment