-
Notifications
You must be signed in to change notification settings - Fork 10
/
nft-blackhole.template
55 lines (47 loc) · 1.42 KB
/
nft-blackhole.template
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
table inet blackhole {
set whitelist-v4 {
type ipv4_addr
flags interval
auto-merge
}
set whitelist-v6 {
type ipv6_addr
flags interval
auto-merge
}
set blacklist-v4 {
type ipv4_addr
flags interval
auto-merge
}
set blacklist-v6 {
type ipv6_addr
flags interval
auto-merge
}
set country-v4 {
type ipv4_addr
flags interval
auto-merge
}
set country-v6 {
type ipv6_addr
flags interval
auto-merge
}
chain input {
type filter hook input priority -1; policy ${default_policy};
iifname lo accept
ct state established,related accept
ip saddr @whitelist-v4 counter accept
ip6 saddr @whitelist-v6 counter accept
ip saddr @blacklist-v4 counter ${block_policy}
ip6 saddr @blacklist-v6 counter ${block_policy}
${country_ex_ports_rule}
ip saddr @country-v4 counter ${country_policy}
ip6 saddr @country-v6 counter ${country_policy}
counter
}
${chain_output}
${chain_forward}
}