/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 ipsec auto --add any-east-l2tp
"any-east-l2tp": added IKEv1 connection
east #
 # ensure that clear text does not get through
east #
 iptables -A INPUT  -i eth1 -d 192.1.2.23 -m policy --dir in --pol none -p udp --dport 1701 -j REJECT
east #
 iptables -A INPUT -m policy --dir in --pol ipsec -j ACCEPT
east #
 iptables -A OUTPUT -o eth1 -s 192.1.2.23 -m policy --dir out --pol none -p udp --sport 1701 -j REJECT
east #
 iptables -A OUTPUT -m policy --dir out --pol ipsec -j ACCEPT
east #
 ../../guestbin/l2tpd.sh
east #
 ../../guestbin/echo-server.sh -tcp -4 7 -daemon
listening on IPv4 TCP port 7
east #
 echo done
done
east #
 ../../guestbin/ipsec-kernel-state.sh
src 192.1.2.23 dst 192.1.2.254
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 
	auth-trunc hmac(sha1) 0xHASHKEY 96
	enc cbc(aes) 0xENCKEY
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	sel src 192.1.2.23/32 dst 192.1.2.254/32 proto udp sport 1701 dport 1701 
src 192.1.2.254 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 
	auth-trunc hmac(sha1) 0xHASHKEY 96
	enc cbc(aes) 0xENCKEY
	encap type espinudp sport 4500 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
	sel src 192.1.2.254/32 dst 192.1.2.23/32 proto udp sport 1701 dport 1701 
east #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.1.2.23/32 dst 192.1.2.254/32 proto udp sport 1701 dport 1701
	dir out priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
src 192.1.2.254/32 dst 192.1.2.23/32 proto udp sport 1701 dport 1701
	dir in priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
east #
 grep 'Result using RFC 3947' /tmp/pluto.log
| NAT-Traversal: Result using RFC 3947 (NAT-Traversal) sender port 500: peer behind NAT
east #
 
