Skip to content

Instantly share code, notes, and snippets.

@roblav96
Created May 23, 2020 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roblav96/3ba2f44d9fa949b0b4db11520927b4a4 to your computer and use it in GitHub Desktop.
Save roblav96/3ba2f44d9fa949b0b4db11520927b4a4 to your computer and use it in GitHub Desktop.
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
ct state { established, related } accept
ct state { invalid } drop
iif "lo" accept
tcp dport 8022 accept
}
chain forward {
type filter hook forward priority 0; policy drop;
ct state { established, related } accept
ct state { invalid } drop
}
chain output {
type filter hook output priority 0; policy drop;
ct state { new, established, related } accept
ct state { invalid } drop
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment