nftables: simplify rules via untracked state

This commit is contained in:
Daniel Micay 2024-04-23 02:08:57 -04:00
parent d369f159a9
commit 5ba6cbd3d1
9 changed files with 9 additions and 30 deletions

View File

@ -47,9 +47,7 @@ table inet filter {
policy drop
tcp dport { 22, 80, 443 } goto input-tcp-service
iif lo accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -47,9 +47,7 @@ table inet filter {
policy drop
tcp dport { 22, 80, 443 } goto input-tcp-service
iif lo accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -59,9 +59,7 @@ table inet filter {
policy drop
tcp dport { 22, 25, 80, 443, 465, 993 } goto input-tcp-service
iif lo accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -47,9 +47,7 @@ table inet filter {
policy drop
tcp dport { 22, 80, 443 } goto input-tcp-service
iif lo accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -56,10 +56,7 @@ table inet filter {
policy drop
tcp dport { 22, 80, 443, 7275 } goto input-tcp-service
iif lo accept
udp dport 123 accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -49,10 +49,7 @@ table inet filter {
policy drop
tcp dport { 22, 53, 80, 443, 853 } goto input-tcp-service
iif lo accept
udp dport 53 accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -61,10 +61,7 @@ table inet filter {
policy drop
tcp dport { 22, 53, 80, 443, 853 } goto input-tcp-service
iif lo accept
udp dport 53 accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -47,9 +47,7 @@ table inet filter {
policy drop
tcp dport { 22, 80, 443 } goto input-tcp-service
iif lo accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {

View File

@ -57,9 +57,7 @@ table inet filter {
policy drop
tcp dport { 22, 80, 443 } goto input-tcp-service
iif lo accept
meta l4proto { icmp, ipv6-icmp } accept
ct state vmap { new : drop, established : accept, related : accept }
ct state vmap { established : accept, related : accept, new : drop, untracked: accept }
}
chain input-tcp-service {