blob: a4da480b36fa90f172e7309874134a16f71cc9c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
set -e
RULESET="add table ip test
add chain ip test tc
add rule ip test tc counter"
$NFT -f - <<< "$RULESET"
if [ $? -ne 0 ] ; then
echo "E: unable to load good ruleset" >&2
exit 1
fi
RULESET="delete rule ip test tc handle 2
flush ruleset"
$NFT -f - <<< "$RULESET"
if [ $? -ne 0 ] ; then
echo "E: unable to load good ruleset" >&2
exit 1
fi
|