summaryrefslogtreecommitdiff
path: root/testing/tests/p2pnat/medsrv-psk/hosts/alice
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-02-08 18:04:42 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-02-08 18:04:42 +0000
commit73ac0ec24bdf4bf3d82850b80dba4905c3e4f884 (patch)
treef36bb7f5967d4aaeb6621860639df312c1dcad7c /testing/tests/p2pnat/medsrv-psk/hosts/alice
parent61c73fef76f2fb057e3dde2fc4d32e933f22bc74 (diff)
downloadvyos-strongswan-73ac0ec24bdf4bf3d82850b80dba4905c3e4f884.tar.gz
vyos-strongswan-73ac0ec24bdf4bf3d82850b80dba4905c3e4f884.zip
- Updated to new upstream release.
- Updated ja.po.
Diffstat (limited to 'testing/tests/p2pnat/medsrv-psk/hosts/alice')
-rwxr-xr-xtesting/tests/p2pnat/medsrv-psk/hosts/alice/etc/init.d/iptables74
-rwxr-xr-xtesting/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.conf36
-rw-r--r--testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.secrets7
3 files changed, 117 insertions, 0 deletions
diff --git a/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/init.d/iptables b/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/init.d/iptables
new file mode 100755
index 000000000..09b4cabfa
--- /dev/null
+++ b/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/init.d/iptables
@@ -0,0 +1,74 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="start stop reload"
+
+depend() {
+ before net
+ need logger
+}
+
+start() {
+ ebegin "Starting firewall"
+
+ # default policy is DROP
+ /sbin/iptables -P INPUT DROP
+ /sbin/iptables -P OUTPUT DROP
+ /sbin/iptables -P FORWARD DROP
+
+ # allow IKE
+ iptables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
+ iptables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
+
+ # allow NAT-T including P2P
+ iptables -A INPUT -i eth0 -p udp --dport 4500 -j ACCEPT
+ iptables -A OUTPUT -o eth0 -p udp --sport 4500 -j ACCEPT
+
+
+ # allow crl fetch from winnetou
+ iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
+ iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
+
+ # allow ssh
+ iptables -A INPUT -p tcp --dport 22 -j ACCEPT
+ iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping firewall"
+ for a in `cat /proc/net/ip_tables_names`; do
+ /sbin/iptables -F -t $a
+ /sbin/iptables -X -t $a
+
+ if [ $a == nat ]; then
+ /sbin/iptables -t nat -P PREROUTING ACCEPT
+ /sbin/iptables -t nat -P POSTROUTING ACCEPT
+ /sbin/iptables -t nat -P OUTPUT ACCEPT
+ elif [ $a == mangle ]; then
+ /sbin/iptables -t mangle -P PREROUTING ACCEPT
+ /sbin/iptables -t mangle -P INPUT ACCEPT
+ /sbin/iptables -t mangle -P FORWARD ACCEPT
+ /sbin/iptables -t mangle -P OUTPUT ACCEPT
+ /sbin/iptables -t mangle -P POSTROUTING ACCEPT
+ elif [ $a == filter ]; then
+ /sbin/iptables -t filter -P INPUT ACCEPT
+ /sbin/iptables -t filter -P FORWARD ACCEPT
+ /sbin/iptables -t filter -P OUTPUT ACCEPT
+ fi
+ done
+ eend $?
+}
+
+reload() {
+ ebegin "Flushing firewall"
+ for a in `cat /proc/net/ip_tables_names`; do
+ /sbin/iptables -F -t $a
+ /sbin/iptables -X -t $a
+ done;
+ eend $?
+ start
+}
+
diff --git a/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.conf b/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.conf
new file mode 100755
index 000000000..370934ce7
--- /dev/null
+++ b/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.conf
@@ -0,0 +1,36 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+ crlcheckinterval=180
+ strictcrlpolicy=no
+ plutostart=no
+
+conn %default
+ ikelifetime=60m
+ keylife=20m
+ rekeymargin=3m
+ keyingtries=1
+ keyexchange=ikev2
+ mobike=no
+ dpdaction=restart
+ dpddelay=60s
+ left=%defaultroute
+ leftfirewall=yes
+
+conn medsrv
+ leftid=6cu1UTVw@medsrv.org
+ right=PH_IP_CAROL
+ rightid=carol@strongswan.org
+ p2p_mediation=yes
+ authby=psk
+ auto=add
+
+conn p2p
+ leftcert=aliceCert.pem
+ leftid=alice@strongswan.org
+ right=%any
+ rightid=bob@strongswan.org
+ rightsubnet=PH_IP_BOB/32
+ p2p_mediated_by=medsrv
+ p2p_peerid=av9oEPMz@medsrv.org
+ auto=start
diff --git a/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.secrets b/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.secrets
new file mode 100644
index 000000000..59396bbeb
--- /dev/null
+++ b/testing/tests/p2pnat/medsrv-psk/hosts/alice/etc/ipsec.secrets
@@ -0,0 +1,7 @@
+# /etc/ipsec.secrets - strongSwan IPsec secrets file
+
+: RSA aliceKey.pem
+
+# secret used for mediation connection
+
+6cu1UTVw@medsrv.org : PSK "BAXz/6cSITttd0CzF9799p859Pi4LPnP"