nftables.nft (655B)
1 #!/usr/sbin/nft -f 2 # the firewall. nothing comes in that you did not ask for; everything goes out. drop it to open a box up, 3 # or add your own "tcp dport 22 accept" lines to the input chain to let something in. 4 flush ruleset 5 6 table inet filter { 7 chain input { 8 type filter hook input priority 0; policy drop; 9 ct state established,related accept 10 ct state invalid drop 11 iif lo accept 12 ip protocol icmp accept 13 ip6 nexthdr icmpv6 accept 14 udp sport 67 udp dport 68 accept # a dhcp client's answers 15 } 16 chain forward { 17 type filter hook forward priority 0; policy drop; 18 } 19 chain output { 20 type filter hook output priority 0; policy accept; 21 } 22 }