added passthrough scenario
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
All IP traffic from the subnet behind the gateway <b>moon</b> is tunneled
|
||||||
|
to the gateway <b>sun</b> using the 0.0.0.0/0 network mask. In order
|
||||||
|
to prevent local subnet traffic from escaping through the tunnel, a
|
||||||
|
passthrough policy for the 10.1.0.0/16 network is inserted on <b>moon</b>.
|
||||||
|
A series of internal and external pings verifies the correct
|
||||||
|
functioning of the setup.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
moon::ipsec status::net-net.*STATE_QUICK_I2.*IPsec SA established::YES
|
||||||
|
sun::ipsec status::net-net.*STATE_QUICK_R2.*IPsec SA established::YES
|
||||||
|
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
||||||
|
alice::ping -c 1 PH_IP_MOON1::64 bytes from PH_IP_MOON1: icmp_seq=1::YES
|
||||||
|
alice::ping -c 1 PH_IP_MOON::64 bytes from PH_IP_MOON: icmp_seq=1::YES
|
||||||
|
moon::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
||||||
|
moon::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
|
||||||
|
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
|
||||||
|
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
plutodebug=control
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
charonstart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
left=PH_IP_MOON
|
||||||
|
leftsubnet=10.1.0.0/16
|
||||||
|
right=PH_IP_SUN
|
||||||
|
|
||||||
|
conn net-net
|
||||||
|
rightsubnet=0.0.0.0/0
|
||||||
|
[email protected]
|
||||||
|
[email protected]
|
||||||
|
leftcert=moonCert.pem
|
||||||
|
leftsourceip=10.1.0.1
|
||||||
|
leftfirewall=yes
|
||||||
|
lefthostaccess=yes
|
||||||
|
auto=add
|
||||||
|
|
||||||
|
conn pass
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
type=passthrough
|
||||||
|
authby=never
|
||||||
|
auto=route
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
plutodebug=control
|
||||||
|
crlcheckinterval=180
|
||||||
|
strictcrlpolicy=no
|
||||||
|
nat_traversal=yes
|
||||||
|
charonstart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
|
||||||
|
conn net-net
|
||||||
|
left=PH_IP_SUN
|
||||||
|
leftcert=sunCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
leftsubnet=0.0.0.0/0
|
||||||
|
right=PH_IP_MOON
|
||||||
|
rightsubnet=10.1.0.0/16
|
||||||
|
[email protected]
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
moon::ipsec stop
|
||||||
|
sun::ipsec stop
|
||||||
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
sun::/etc/init.d/iptables stop 2> /dev/null
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
moon::/etc/init.d/iptables start 2> /dev/null
|
||||||
|
sun::/etc/init.d/iptables start 2> /dev/null
|
||||||
|
moon::iptables -I INPUT -i eth1 -s 10.1.0.0/16 -j ACCEPT
|
||||||
|
moon::iptables -I OUTPUT -o eth1 -d 10.1.0.0/16 -j ACCEPT
|
||||||
|
moon::ipsec start
|
||||||
|
sun::ipsec start
|
||||||
|
moon::sleep 2
|
||||||
|
moon::ipsec up net-net
|
||||||
@@ -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 moon winnetou sun bob"
|
||||||
|
|
||||||
|
# Corresponding block diagram
|
||||||
|
#
|
||||||
|
DIAGRAM="a-m-w-s-b.png"
|
||||||
|
|
||||||
|
# UML instances on which tcpdump is to be started
|
||||||
|
#
|
||||||
|
TCPDUMPHOSTS="sun"
|
||||||
|
|
||||||
|
# UML instances on which IPsec is started
|
||||||
|
# Used for IPsec logging purposes
|
||||||
|
#
|
||||||
|
IPSECHOSTS="moon sun"
|
||||||
Reference in New Issue
Block a user