Installation configuration for L2TP client xl2tpd under Linux

Source: Internet
Author: User

1. Download XL2TP

Http://pkgs.org/search/?query=xl2tp&type=smart Select the appropriate version to download

2. Installing XL2TP and PPP

Yum Install xl2tpd

Yum Install PPP

3, Configuration xl2tpd.conf

File Address:/etc/xl2tpd/xl2tpd.conf

For insurance purposes, before modifying the configuration file, back up the original file, the original xl2tpd.conf [LNS default], this seems to be used as a XL2TPD L2TPD server key statement.

To use XL2TPD as a L2TP client, I deleted everything in xl2tpd.conf and added the following lines

Vi/etc/xl2tpd/xl2tpd.conf the following content directly into the inside, pay attention to fill in the VPN account and server address, save exit

[Lac Testvpn (VPN name)]

name = L2tp_user_name; L2TP account

LNS = 192.168.11.1; IP of the L2TP server

Pppoptfile =/ETC/PPP/PEERS/TESTVPN.L2TPD; PPPD the configuration file used when dialing

PPP debug = Yes

4. Set the dialing profile:

File path: xl2tpd.conf file in Pppoptfile =/etc/ppp/peers/testvpn.l2tpd

Edit with VI/ETC/PPP/PEERS/TESTVPN.L2TPD

Copy the following directly into the contents and save the exit

RemoteName Testvpn

User "L2tp_user_name" if the server is under Windows domain environment The wording should be "domain \ \ username" escaped with \ Pair \

Password "L2tp_user_password"

Unit 0

Lock

Nodeflate

Nobsdcomp

Noauth

Persist

Nopcomp

Noaccomp

Maxfail 5

Debug

5, the configuration files are built, you can start xl2tpd, note that the start does not mean dialing

Run Mode 1: Run/etc/init.d/xl2tpd start or xl2tpd-d, this startup mode will automatically go to find/etc/xl2tpd/xl2tpd.conf this configuration file,

Run the way 2:# xl2tpd-c "/your/config_file/path", if you use this method, to ensure the existence of/var/run/xl2tpd/this directory, actually see/etc/init.d/xl2tpd This file can also be seen, If it does not exist, the script will create this directory

6. Start Dialing:

# echo ' C Testvpn ' >/var/run/xl2tpd/l2tp-control

If the dial succeeds, you can see a ppp0 interface through Ifconfig.

Note: Add a route if you are not connected

Route add-net 192.168.10.0 netmask 255.255.255.0 Dev ppp0

7. Disconnect:

# echo ' d testvpn ' >/var/run/xl2tpd/l2tp-control

8, start xl2tpd to dial, the whole process can view the log

Tail-f/var/log/message

Installation configuration for L2TP client xl2tpd under Linux

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.