blob: 0dad3d0944d23141d61f37528d286dc6fa806942 (
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/sh
# -4|-6 dirs pkt-count
set -e
if [ "$1" = "-4" ]; then
cmd=iptables
proto=ipv4
src=10.255.255.64
dst=127.0.0.1
else
cmd=ip6tables
proto=ipv6
src=1002:1002:1002:1002::32
dst=::1
fi
$cmd -A INPUT -m set --match-set test $2 -j DROP
for x in `seq 1 $3`; do
sendip -p $proto -id $dst -is $src -p tcp -td 80 -ts 1025 $dst
done
$cmd -D INPUT -m set --match-set test $2 -j DROP
|