OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / openswan / testing / pluto / l2tp-01 / northinit.sh
1 : ==== start ====
2 TESTNAME=l2tp-01
3 source /testing/pluto/bin/northlocal.sh
4
5 if [ -f /var/run/l2tpd.pid ]; then kill `cat /var/run/l2tpd.pid`; fi
6
7 iptables -F INPUT
8 iptables -F OUTPUT
9 ipsec setup stop
10
11 # make sure that clear text does not get through
12 iptables -A INPUT -i eth1 -s 192.1.2.23 -p udp --sport 1701 -j REJECT
13 iptables -A OUTPUT -o eth1 -d 192.1.2.23 -p udp --dport 1701 -j REJECT
14
15 ipsec setup restart
16 ipsec auto --add north--east-l2tp
17 ipsec auto --add north--east-pass
18 /testing/pluto/bin/wait-until-pluto-started
19 ipsec auto --route north--east-pass
20 ipsec whack --debug-control --debug-controlmore --debug-natt
21
22 if [ ! -f /etc/ppp/chap-secrets ]; then mount --bind /testing/pluto/l2tp-01 /etc/ppp; fi
23 (cd /tmp && l2tpd -c /testing/pluto/l2tp-01/north.l2tpd.conf -D 2>/tmp/l2tpd.log ) &
24
25 ipsec auto --route north--east-l2tp
26
27 echo done
28