#!/usr/bin/nft -f flush ruleset table inet filter { chain input { type filter hook input priority 0; policy drop; iif "lo" counter accept ct state established,related counter accept ip saddr 172.27.203.254 ip protocol icmp icmp type echo-request counter accept } chain output { type filter hook output priority 0; policy drop; oif "lo" counter accept ct state established,related counter accept udp dport 53 counter accept tcp dport 53 counter accept tcp dport 853 counter accept # DNS over TLS ip protocol icmp icmp type echo-request counter accept tcp dport 80 counter accept tcp dport 443 counter accept } }