blob: 90f87182ef54ad9ba0d211ec3b2f9cb37134c2af (
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
|
#!/bin/bash
set -e
RULESET="add table x
add chain x y
add chain x z
add rule x z jump y"
$NFT -f - <<< $RULESET
if [ $? -ne 0 ] ; then
echo "E: unable to load good ruleset" >&2
exit 1
fi
RULESET="delete rule x z handle 3
delete chain x z
delete chain x y
delete table x"
$NFT -f - <<< $RULESET
if [ $? -ne 0 ] ; then
echo "E: unable to load good ruleset" >&2
exit 1
fi
|