config setup # strictcrlpolicy=yes # uniqueids = no
conn L2TP-PSK-noNAT authby=secret #shared secret. Use rsasig for certificates. auto=add #the ipsec tunnel should be started and routes created when the ipsec daemon itself starts. keyingtries=3 #Only negotiate a conn. 3 times. ikelifetime=8h keylife=1h ike=aes256-sha1,aes128-sha1,3des-sha1 type=transport #because we use l2tp as tunnel protocol left=1.2.3.4 # Your server's public IP #fill in server IP above leftprotoport=17/1701 right=%any rightprotoport=17/%any dpddelay=10 # Dead Peer Dectection (RFC 3706) keepalives delay dpdtimeout=20 # length of time (in seconds) we will idle without hearing either an R_U_THERE poll from our peer, or an R_U_THERE_ACK reply. dpdaction=clear # When a DPD enabled peer is declared dead, what action should be taken. clear means the eroute and SA with both be cleared.
[global] ipsec saref = yes saref refinfo = 30 ;debug avp = yes ;debug network = yes ;debug state = yes ;debug tunnel = yes [lns default] ip range = 192.168.1.2-192.168.1.100 ; IP address range for clients local ip = 192.168.1.1 ; Local IP address for VPN server require chap = yes refuse pap = yes require authentication = yes ;ppp debug = yes pppoptfile = /etc/ppp/options.xl2tpd length bit = yes
sudo nano /etc/ppp/options.xl2tpd
1 2 3 4 5 6 7 8 9 10 11 12 13
require-mschap-v2 ms-dns 8.8.8.8 ms-dns 8.8.4.4 auth mtu 1200 mru 1000 crtscts hide-password modem name l2tpd proxyarp lcp-echo-interval 30 lcp-echo-failure 4