tests with subdirectory structure
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
The roadwarriors <b>alice</b> and <b>venus</b> sitting behind the NAT router <b>moon</b> set up
|
||||
tunnels to gateway <b>sun</b>. UDP encapsulation is used to traverse the NAT router.
|
||||
<b>leftfirewall=yes</b> automatically inserts iptables-based firewall rules that let pass
|
||||
the tunneled traffic. In order to test the tunnel, the NAT-ed hosts <b>alice</b> and <b>venus</b>
|
||||
ping the client <b>bob</b> behind the gateway <b>sun</b>.
|
||||
@@ -0,0 +1,9 @@
|
||||
alice::ipsec status::nat-t.*STATE_QUICK_I2.*IPsec SA established::YES
|
||||
venus::ipsec status::nat-t.*STATE_QUICK_I2.*IPsec SA established::YES
|
||||
sun::ipsec status::nat-t.*STATE_QUICK_R2.*IPsec SA established::YES
|
||||
sun::ipsec status::nat-t.*[email protected]::YES
|
||||
sun::ipsec status::nat-t.*@venus.strongswan.org::YES
|
||||
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
||||
venus::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
||||
moon::tcpdump::IP moon.strongswan.org.* > sun.strongswan.org.ipsec-nat-t: UDP::YES
|
||||
moon::tcpdump::IP sun.strongswan.org.ipsec-nat-t > moon.strongswan.org.*: UDP::YES
|
||||
@@ -0,0 +1,11 @@
|
||||
alice::iptables -v -n -L
|
||||
venus::iptables -v -n -L
|
||||
sun::iptables -v -n -L
|
||||
sun::ipsec stop
|
||||
alice::ipsec stop
|
||||
venus::ipsec stop
|
||||
alice::/etc/init.d/iptables stop 2> /dev/null
|
||||
venus::/etc/init.d/iptables stop 2> /dev/null
|
||||
sun::/etc/init.d/iptables stop 2> /dev/null
|
||||
moon::iptables -t nat -F
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
alice::/etc/init.d/iptables start 2> /dev/null
|
||||
venus::/etc/init.d/iptables start 2> /dev/null
|
||||
sun::/etc/init.d/iptables start 2> /dev/null
|
||||
moon::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p udp -j SNAT --to-source PH_IP_MOON:1024-1100
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p tcp -j SNAT --to-source PH_IP_MOON:2000-2100
|
||||
alice::ipsec start
|
||||
venus::ipsec start
|
||||
sun::ipsec start
|
||||
alice::sleep 5
|
||||
alice::ipsec up nat-t
|
||||
venus::sleep 5
|
||||
venus::ipsec up nat-t
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This configuration file provides information on the
|
||||
# UML instances used for this test
|
||||
|
||||
# All UML instances that are required for this test
|
||||
#
|
||||
UMLHOSTS="alice venus moon winnetou sun bob"
|
||||
|
||||
# Corresponding block diagram
|
||||
#
|
||||
DIAGRAM="a-v-m-w-s-b.png"
|
||||
|
||||
# UML instances on which tcpdump is to be started
|
||||
#
|
||||
TCPDUMPHOSTS="moon"
|
||||
|
||||
# UML instances on which IPsec is started
|
||||
# Used for IPsec logging purposes
|
||||
#
|
||||
IPSECHOSTS="alice venus sun"
|
||||
Reference in New Issue
Block a user