= openswan (PSK) eth0 eth1 client --- 192.168.1.1 [VPN server] 192.168.0.10 -------- 192.168.0.11 [server1] ppp | 192.168.0.5 |--- 192.168.0.12 [server2] #apt-get install openswan l2tpd #vim /etc/ipsec.conf version 2.0 config setup nat_traversal=yes nhelpers=0 conn L2TP-PSK type=transport ike=3des-md5 esp=3des-md5 authby=secret pfs=no rekey=no keyingtries=3 left=%defaultroute #leftnexthop=%defaultroute leftprotoport=17/1701 right=%any rightprotoport=17/%any auto=add include /etc/ipsec.d/examples/no_oe.conf #vim /etc/ipsec.secrets : PSK "1234567890" #vim /etc/l2tpd/l2tpd.conf [lns default] ip range = 192.168.0.50-192.168.0.100 local ip = 192.168.0.5 # require chap = yes refuse pap = yes require authentication = yes name = LinuxVPNserver ppp debug = yes pppoptfile = /etc/ppp/options.l2tpd length bit = yes #vim /etc/ppp/options.l2tpd require-mschap-v2 nodefaultroute debug lock nobsdcomp #vim B/etc/ppp/chap-secrets user LinuxVPNserver password * #sysctl net.ipv4.ip_forward=1 #vim /etc/sysctl.conf net.ipv4.ip_forward = 1 #/etc/init.d/ipsec restart #/etc/init.d/l2tpd restart Windows setting Create a new connection, type user name and password Click Proerties, type ip address of server Click "Security" tab, Click IPSec Settings, and type PSK key. Click "Networking" tab, Chose "Internet Protocol(TCP/IP), Click "Properties"" Click "Advanced" , uncheck "Usedefault gateway on remote network" Connect