mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2024-06-29 15:52:10 +00:00
56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
![]() |
#!/usr/bin/nft -f
|
||
|
|
||
|
flush ruleset
|
||
|
|
||
|
table inet filter {
|
||
|
chain prerouting-raw {
|
||
|
type filter hook prerouting priority raw
|
||
|
|
||
|
iif lo notrack
|
||
|
udp dport domain notrack
|
||
|
tcp dport {ssh, domain} notrack
|
||
|
ip protocol icmp notrack
|
||
|
meta l4proto ipv6-icmp notrack
|
||
|
}
|
||
|
|
||
|
chain output-raw {
|
||
|
type filter hook output priority raw
|
||
|
|
||
|
oif lo notrack
|
||
|
udp sport domain notrack
|
||
|
tcp sport {ssh, domain} notrack
|
||
|
ip protocol icmp notrack
|
||
|
meta l4proto ipv6-icmp notrack
|
||
|
}
|
||
|
|
||
|
chain input {
|
||
|
type filter hook input priority filter
|
||
|
policy drop
|
||
|
|
||
|
iif lo accept
|
||
|
udp dport domain accept
|
||
|
tcp dport {ssh, domain} accept
|
||
|
ip protocol icmp accept
|
||
|
meta l4proto ipv6-icmp accept
|
||
|
|
||
|
ct state vmap { invalid : drop, established : accept, related : accept }
|
||
|
|
||
|
meta l4proto udp reject
|
||
|
meta l4proto tcp reject with tcp reset
|
||
|
reject
|
||
|
}
|
||
|
|
||
|
chain forward {
|
||
|
type filter hook forward priority filter
|
||
|
policy drop
|
||
|
}
|
||
|
|
||
|
chain output {
|
||
|
type filter hook output priority filter
|
||
|
|
||
|
oif lo accept
|
||
|
|
||
|
skuid != {root, systemd-network, chrony, unbound, powerdns} counter reject
|
||
|
}
|
||
|
}
|