Fedora through l2tp vpn networking method

  

l2tp is the Internet tunneling protocol, through the l2tp settings can achieve system networking, then under the Fedora 17 system, how to achieve Internet access through l2tp vpn? In fact, it is very simple, let's learn together with Xiaobian.

1. Installation l2tpd

sudo yum install l2tpd

2. Profiles

/etc/xl2tpd/xl2tpd.conf

port = 1701 ; * Bind to port 1701

access control = yes ; * Refuse connections without IP match

rand source = dev ; Source for entropy for random

[lac zju]

lns = 10.5.1.9 ; * Who is our LNS?

redial = yes ; * Redial if disconnected?

redial timeout = 3 ; * Wait n seconds between redials

max redials = 999 ; * Give up after n consecutive failures

require chap = yes ; * Require CHAP auth . by peer

refuse pap = yes ; * Refuse PAP authentication

require authentication = yes ; * Require peer to authenticate

ppp debug = no ; * Turn on PPP debugging

pppoptfile = /etc/xl2tpd/options ; * ppp options file for this lac

name = USERNAME@SERVICE_TYPE

[img]http://common.cnblogs. Com/images/copycode.gif[/img]

/etc/ppp/chap-secrets

USERNAME@SERVICE_TYPE * PASSWORD *

3.Start xl2tpd

sudo service start xl2tpd

or

sudo /etc/rc.d/init.d/xl2tpd start

4.Connection

sudo Echo “d zju”"/var/run/xl2tpd/l2tp-control

#The zju here should be the same as the byte after the lac in the configuration file

5. Check for connection

ip addr show |  Grep ‘inet.*ppp’

The output is connected

6.Setting the route

ip route add default dev ppp0

7. Disconnect

sudo echo “d zju””/var/run/xl2tpd/l2tp-control

The above is how Fedora is introduced through l2tp vpn networking, because l2tp is not included in the system. You need to download and install it yourself, and use it in related configuration.

Copyright © Windows knowledge All Rights Reserved