enabled firewall support
This commit is contained in:
@@ -3,3 +3,6 @@ respectively, is automatically established by means of the setting
|
||||
<b>auto=start</b> in ipsec.conf. The connection is tested by client <b>alice</b>
|
||||
behind gateway <b>moon</b> pinging the client <b>bob</b> located behind
|
||||
gateway <b>sun</b>.
|
||||
<p>
|
||||
<b>leftfirewall=yes</b> automatically inserts iptables-based firewall rules
|
||||
that let pass the tunneled traffic.
|
||||
|
||||
@@ -9,12 +9,12 @@ conn %default
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
leftnexthop=%direct
|
||||
keyexchange=ikev2
|
||||
|
||||
conn net-net
|
||||
left=PH_IP_MOON
|
||||
leftsubnet=10.1.0.0/16
|
||||
leftnexthop=%direct
|
||||
leftcert=moonCert.pem
|
||||
[email protected]
|
||||
leftfirewall=yes
|
||||
|
||||
@@ -9,14 +9,16 @@ conn %default
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
keyexchange=ikev2
|
||||
|
||||
conn net-net
|
||||
left=PH_IP_SUN
|
||||
leftcert=sunCert.pem
|
||||
[email protected]
|
||||
leftsubnet=10.2.0.0/16
|
||||
leftnexthop=%direct
|
||||
leftfirewall=yes
|
||||
right=PH_IP_MOON
|
||||
[email protected]
|
||||
rightsubnet=10.1.0.0/16
|
||||
keyexchange=ikev2
|
||||
auto=add
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
moon::iptables -v -n -L
|
||||
sun::iptables -v -n -L
|
||||
moon::ipsec stop
|
||||
sun::ipsec stop
|
||||
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||
sun::/etc/init.d/iptables stop 2> /dev/null
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
moon::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
sun::echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
moon::/etc/init.d/iptables start 2> /dev/null
|
||||
sun::/etc/init.d/iptables start 2> /dev/null
|
||||
sun::ipsec start
|
||||
sun::sleep 2
|
||||
moon::ipsec start
|
||||
|
||||
Reference in New Issue
Block a user