west:~#
 iptables -D INPUT -s 192.1.2.23/32 -d 0/0 -j DROP
iptables: Bad rule (does a matching rule exist in that chain?)
west:~#
 iptables -D OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
iptables: Bad rule (does a matching rule exist in that chain?)
west:~#
 iptables -F
west:~#
 ipsec eroute
west:~#
 echo done
done
west:~#
 TESTNAME=dpd-06
west:~#
 source /testing/pluto/bin/westlocal.sh
west:~#
 ipsec setup start
ipsec_setup: Starting Openswan IPsec VERSION
west:~#
 ipsec auto --add west-east
west:~#
 ipsec whack --debug-dpd --debug-control
west:~#
 : we can transmit in the clear
west:~#
 ping -q -c 8 -n 192.1.2.23
PING 192.1.2.23 (192.1.2.23): 56 data bytes

--- 192.1.2.23 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 3.1/4.5/9.26 ms
west:~#
 : bring up the tunnel
west:~#
 ipsec auto --up west-east
104 "west-east" #1: STATE_MAIN_I1: initiate
003 "west-east" #1: received Vendor ID payload [Openswan 
003 "west-east" #1: received Vendor ID payload [Dead Peer Detection]
106 "west-east" #1: STATE_MAIN_I2: sent MI2, expecting MR2
108 "west-east" #1: STATE_MAIN_I3: sent MI3, expecting MR3
004 "west-east" #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=aes_128 prf=oakley_sha group=modp1536}
117 "west-east" #2: STATE_QUICK_I1: initiate
004 "west-east" #2: STATE_QUICK_I2: sent QI2, IPsec SA established tunnel mode
west:~#
 : use the tunnel
west:~#
 ping -q -c 8 -n 192.1.2.23
PING 192.1.2.23 (192.1.2.23): 56 data bytes

--- 192.1.2.23 ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 3.1/4.5/9.26 ms
west:~#
 : show the tunnel
west:~#
 ipsec eroute
10         192.1.2.45/32      -> 192.1.2.23/32      => tun0x1001@192.1.2.23
west:~#
 : Let R_U_THERE packets flow
west:~#
 sleep 10
west:~#
 sleep 10
west:~#
 echo Create the block
Create the block
west:~#
 iptables -I INPUT -s 192.1.2.23/32  -d 0/0 -j DROP
west:~#
 iptables -I OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
west:~#
 sleep 10
west:~#
 sleep 10
west:~#
 iptables -D INPUT -s 192.1.2.23/32 -d 0/0 -j DROP
west:~#
 iptables -D OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROP
west:~#
 sleep 10
west:~#
 ipsec eroute
0          192.1.2.45/32      -> 192.1.2.23/32      => tun0x1003@192.1.2.23
west:~#
 echo done
done
west:~#
 

west:~#
 ipsec setup stop
IPSEC EVENT: KLIPS device ipsec0 shut down.
ipsec_setup: Stopping Openswan IPsec...
west:~#
 echo end
end

