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