当前位置:  首页  >  服务器技术  >  Linux/unix  >  Linux系统

Fedora17使用l2tpdVPN上网

1.安装l2tpdsudoyuminstalll2tpd2.配置文件/etc/xl2tpd/xl2tpd.confport=1701

1.安装l2tpd

sudo yum install l2tpd

2.配置文件

/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.启动xl2tpd

sudo service start xl2tpd

或者

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

4.连接

sudo echo "d zju">/var/run/xl2tpd/l2tp-control

#这里的zju要和配置文件中的的lac 后面的字节一样

5.查看是否连接

ip addr show | grep 'inet.*ppp'

有输出就是连接上了

6.设置路由

ip route add default dev ppp0

6.断开

sudo echo "d zju">/var/run/xl2tpd/l2tp-control

吐了个 "CAO" !
扫码关注 PHP1 官方微信号
PHP1.CN | 中国最专业的PHP中文社区 | PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | PHP问答
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved PHP1.CN 第一PHP社区 版权所有