22 lines
594 B
Django/Jinja
22 lines
594 B
Django/Jinja
#!/usr/sbin/nft -f
|
|||
|
|
flush ruleset
|
||
|
|
table inet filter {
|
||
|
|
chain input {
|
||
|
|
type filter hook input priority filter;
|
||
|
|
policy drop;
|
||
|
|
iif "lo" accept
|
||
|
|
ct state established,related accept
|
||
|
|
ct state invalid drop
|
||
|
|
tcp dport 22 counter accept comment "ssh"
|
||
|
|
tcp dport 80 counter accept comment "http"
|
||
|
|
tcp dport 443 counter accept comment "https"
|
||
|
|
}
|
||
|
|
chain forward {
|
||
|
|
type filter hook forward priority filter;
|
||
|
|
policy drop;
|
||
|
|
}
|
||
|
|
chain output {
|
||
|
|
type filter hook output priority filter;
|
||
|
|
policy accept;
|
||
|
|
}
|
||
|
|
}
|