Build xl2tp server in CentOS 7.2 and build xl2tp in CentOS

Source: Internet
Author: User

Build xl2tp server in CentOS 7.2 and build xl2tp in CentOS

# Download the xl2tpd.tar.gz source code package

'''
Wget http://pkgs.fedoraproject.org/repo/pkgs/xl2tpd/xl2tpd-1.3.8.tar.gz/d244fdcd88f64601b64b7302870afca8/xl2tpd-1.3.8.tar.gz
'''

 

#2. Install xl2tpd and libreswan

'''
Tar-zxvf xl2tpd-1.3.8.tar.gz
Cd xl2tpd-1.3.8
Make & make install
If "contrib/pfc. c: 14: 23: Fatal error: pcap-bpf.h: No file or directory" appears during make, install libpcap
Yum-y install libpcap-devel
'''

#3. Configure the xl2tpd. conf configuration file

'Vim/etc/xl2tpd/xl2tpd. conf'

The modification content is as follows:

'''
[Global]
[Lns default]
Ip range = 172.100.1.100-172.100.1.150
Local ip = 172.100.1.1
Require chap = yes
Refuse pap = yes
Require authentication = yes
Name = LinuxVPNserver
Ppp debug = yes
Pppoptfile =/etc/ppp/options. xl2tpd
Length bit = yes
'''

#4. Configure pppd option Parameters

'Vim/etc/ppp/options. xl2tpd'

The modification content is as follows:

'''
Ipcp-accept-local
Ipcp-accept-remote
Ms-dns 8.8.8.8
Ms-dns 209.244.0.3
Ms-dns 208.67.222.222
Name xl2tpd
# Noccp
Auth
Crtscts
Idle 1800
Mtu 1410 # It is not recommended to set mtu and mru for the first configuration. Otherwise, the error 789 may occur (comment information is removed when the configuration is pasted)
Mru 1410
Nodefaultroute
Debug
Lock
Proxyarp
Connect-delay 5000
Refuse-pap
Refuse-chap
Refuse-mschap
Require-mschap-v2
Persist
Logfile/var/log/xl2tpd. log
'''

#5. Set the l2tp dialing username and password

'''
Vim/etc/ppp/chap-secrets'

Modification content:
Vpnuser * pass *
Note: The user name [space] service [space] Password [space] specified IP Address
'''

#6. Start xl2tpd

'''
/Sbin/chkconfig xl2tpd on
Systemctl enable xl2tpd
Systemctl restart xl2tpd
'''

#7. Use the win7 client for dialing

[Win7 dial Error] (https://shipengliang.com/software-exp/win7-l2tpipsec-%E8% AE %BF%E9%97% AE %E7%BD%91%E7% AB %99%E8%BF%9E%E6%8E%A5%E8%A2% AB %E9%87%8D%E7%BD% AE %E7%9A%84%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95.html)

 

##

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.