L2TP/IPSec VPN Construction on CentOS

iOS10 does not support PPTP, so we have to build an additional L2TP/IPSec server.
Build with https://github.com/philpl/setup-strong-strongswan, it's so easy.
curl -L -O https://raw.github.com/philplckthun/setup-strong-strongswan/master/setup.sh
chmod +x setup.sh
sudo ./setup.sh


Note here, to open udp 1701, 500, 4500 ports.
iptables -I INPUT -p udp --dport 1701 -j ACCEPT
iptables -I INPUT -p udp --dport 500 -j ACCEPT
iptables -I INPUT -p udp --dport 4500 -j ACCEPT
iptables-save
service iptables restart


After the execution is completed, it is found that the connection fails. Look at the log and find that
xl2tpd: /usr/sbin/pppd: In file /etc/ppp/options.xl2tpd: unrecognized option 'crtscts'

This is an unnecessary option, comment it out, restart
/etc/init.d/vpn-assist restart


The following error occurs again
xl2tpd: /usr/sbin/pppd: In file /etc/ppp/options.xl2tpd: unrecognized option 'lock'

Comment out again, restart, link OK.

The Android phone needs to select the L2TP/IPSec PSK type, and the iPhone needs to select the IPSec type.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326204621&siteId=291194637
VPN