栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Fedora通过l2tp vpn联网的方法

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Fedora通过l2tp vpn联网的方法

  l2tp是中Internet隧道协议,通过对l2tp的设置能够实现系统的联网,那么在Fedora 17系统下,要如何通过l2tp vpn来实现上网呢?其实很简单,随小编一起来学习下吧。

  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

  7.断开

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

  上面就是Fedora通过l2tp vpn联网的方法介绍了,因为l2tp不是系统自带的,需要自己下载安装,在进行相关配置使用。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/589290.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号