summaryrefslogtreecommitdiff
path: root/nft/accept-filter.sh
blob: 5dfe5dc328701cc3e279957bb1461dbf5864e0af (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
29
30
31
#!/bin/sh
#
# Copyright (C) 2025-2026 Maria Lisina
# SPDX-License-Identifier: Apache-2.0
#
# nftables accept filter

set -e

cat << EOF > /etc/nftables.nft
#!/usr/sbin/nft -f

flush ruleset

table inet filter {
    chain input {
        type filter hook input priority 0; policy accept;
    }

    chain forward {
        type filter hook forward priority 0; policy accept;
    }

    chain output {
        type filter hook output priority 0; policy accept;
    }
}

include "/var/lib/nftables/*.nft"
include "/etc/nftables.d/*.nft"
EOF