Linux L2TP client xl2tpd installation configuration specific actions

Source: Internet
Author: User

Server environment: Centos 5.8 64-bit

1. Download XL2TP

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

2. Installing PPP and XL2TP

Yum Install PPP

Yum Install xl2tpd

3, Configuration xl2tpd.conf

File Address:/etc/xl2tpd/xl2tpd.conf

For insurance purposes, before modifying the configuration file, back up the original files, 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 the way 1:# 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

Run Mode 2: Run/ETC/INIT.D/XL2TPD start, this startup mode will automatically find/etc/xl2tpd/xl2tpd.conf this configuration file,

6. Start Dialing:

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

If the dial succeeds, a PPP0 interface can be seen through the ifconfig.

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


This article from "Nicol Lock Silk Sorrow" blog, please make sure to keep this source http://smoke520.blog.51cto.com/9256117/1845360

Linux L2TP client xl2tpd installation configuration specific actions

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.