3
# we can transmit in the clear
4
ping -q -c 8 -n 192.1.2.23
7
ipsec auto --up west-east
10
#ping -q -c 8 -n 192.1.2.23
13
echo "Tunnel should be up"
16
# Let R_U_THERE packets flow
19
echo "Setting up block"
20
iptables -I INPUT -s 192.1.2.23/32 -d 0/0 -j DROP
21
iptables -I OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
28
# DPD should have triggered now
29
echo "Tunnel should be down on West, not East"
34
iptables -D INPUT -s 192.1.2.23/32 -d 0/0 -j DROP
35
iptables -D OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
36
ping -q -c 8 -n 192.1.2.23
38
# Tunnel should be back up now
39
echo "Tunnel should be up"