blob: 4d90af9a65579e5719e46f13618a24d441dc4073 (
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
|
#!/bin/bash
set -e
RULESET="table ip t {
set s {
type ipv4_addr . inet_proto . inet_service
flags interval
counter
elements = { 1.0.0.1 . udp . 53 }
}
set s2 {
type ipv4_addr . mark
flags interval
elements = { 10.10.10.10 . 0x00000100,
20.20.20.20 . 0x00000200 }
}
}"
$NFT -f - <<< $RULESET
$NFT delete element t s { 1.0.0.1 . udp . 53}
exit 0
|