aboutsummaryrefslogtreecommitdiff
path: root/04/nftables.conf
blob: 04c30b6da0a1f95d4decb1050a793d9de313d84b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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
    }
}