summaryrefslogtreecommitdiffstats
path: root/tests/iptables.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/iptables.sh')
-rwxr-xr-xtests/iptables.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/iptables.sh b/tests/iptables.sh
index 9b1c90c..63b0b92 100755
--- a/tests/iptables.sh
+++ b/tests/iptables.sh
@@ -59,6 +59,35 @@ start)
-j LOG --log-prefix "in set list: "
$cmd -A OUTPUT -d $NET -j DROP
cat /dev/null > .foo.err
+ cat /dev/null > /var/log/kern.log
+ ;;
+start_flags)
+ ../src/ipset n test hash:net $family 2>/dev/null
+ ../src/ipset a test 10.0.0.0/16 2>/dev/null
+ ../src/ipset a test 10.0.0.0/24 nomatch 2>/dev/null
+ ../src/ipset a test 10.0.0.1 2>/dev/null
+ $cmd -A INPUT ! -s 10.0.0.0/16 -j ACCEPT
+ $cmd -A INPUT -m set --match-set test src \
+ -j LOG --log-prefix "in set test: "
+ $cmd -A INPUT -m set --match-set test src --return-nomatch \
+ -j LOG --log-prefix "in set test-nomatch: "
+ $cmd -A INPUT -s 10.0.0.0/16 -j DROP
+ cat /dev/null > .foo.err
+ cat /dev/null > /var/log/kern.log
+ ;;
+start_flags_reversed)
+ ../src/ipset n test hash:net $family 2>/dev/null
+ ../src/ipset a test 10.0.0.0/16 2>/dev/null
+ ../src/ipset a test 10.0.0.0/24 nomatch 2>/dev/null
+ ../src/ipset a test 10.0.0.1 2>/dev/null
+ $cmd -A INPUT ! -s 10.0.0.0/16 -j ACCEPT
+ $cmd -A INPUT -m set --match-set test src --return-nomatch \
+ -j LOG --log-prefix "in set test-nomatch: "
+ $cmd -A INPUT -m set --match-set test src \
+ -j LOG --log-prefix "in set test: "
+ $cmd -A INPUT -s 10.0.0.0/16 -j DROP
+ cat /dev/null > .foo.err
+ cat /dev/null > /var/log/kern.log
;;
del)
$cmd -F INPUT