l2tp,南海东软linux宽带拨号!
发表于 : 2012-08-16 14:29
毕业一年多,直接失业,整理xxx漫画的时候找到了上学时的l2tp拨号笔记,闲得蛋疼,发个贴。
不知道那地方现在还是不是用l2tp,不是的话就没有办法了。
23栋3xx成功上网,然后就是配置,软件是xl2tpd,怎么安装?不用说了吧!
配置文件两个,如下:
xl2tpd.conf:
[global] ; Global parameters
port = 1701 ; * Bind to port 1701
debug avp = yes
debug network = yes
debug packet = yes
debug state = yes
debug tunnel = yes
[lac candy] ; Example VPN LAC definition “这个candy是可以换的。“
lns = 10.10.8.254 ; * Who is our LNS? “拨号的服务器应该还是这个“
require pap = yes ; * Require PAP auth. by peer
require authentication = no ; * Require peer to authenticate
ppp debug = yes ; * Turn on PPP debugging
pppoptfile = /etc/ppp/options.xl2tpd ; * ppp options file for this lac “这个配置文件的位置就是options.xl2tp的位置。“
options.xl2tpd:
user "[email protected]" “那个宽带帐号呢!“
password "xxxxxxxx" “说好的密码呢!“
mtu 1400
mru 1400
#noauth
#nocrtscts
#nodetach
defaultroute
#novj
#nodeflate
#noaccomp
#nopcomp
replacedefaultroute
#lock
#proxyarp
启动阶段>>>>>>>>>>
/etc/init.d/xl2tpd start;
/etc/init.d/xl2tpd stop;
xl2tpd -D;
route add -net 10.10.0.0 netmask 255.255.0.0 gw 10.1.43.253 dev eth0;
echo "c candy" > /var/run/xl2tpd/l2tp-control “为什么是candy?因为第一个配置文件里面是[lac candy],如果不想要candy,你可以用mummy或daddy,但是lac不能少“
不知道那地方现在还是不是用l2tp,不是的话就没有办法了。
23栋3xx成功上网,然后就是配置,软件是xl2tpd,怎么安装?不用说了吧!
配置文件两个,如下:
xl2tpd.conf:
[global] ; Global parameters
port = 1701 ; * Bind to port 1701
debug avp = yes
debug network = yes
debug packet = yes
debug state = yes
debug tunnel = yes
[lac candy] ; Example VPN LAC definition “这个candy是可以换的。“
lns = 10.10.8.254 ; * Who is our LNS? “拨号的服务器应该还是这个“
require pap = yes ; * Require PAP auth. by peer
require authentication = no ; * Require peer to authenticate
ppp debug = yes ; * Turn on PPP debugging
pppoptfile = /etc/ppp/options.xl2tpd ; * ppp options file for this lac “这个配置文件的位置就是options.xl2tp的位置。“
options.xl2tpd:
user "[email protected]" “那个宽带帐号呢!“
password "xxxxxxxx" “说好的密码呢!“
mtu 1400
mru 1400
#noauth
#nocrtscts
#nodetach
defaultroute
#novj
#nodeflate
#noaccomp
#nopcomp
replacedefaultroute
#lock
#proxyarp
启动阶段>>>>>>>>>>
/etc/init.d/xl2tpd start;
/etc/init.d/xl2tpd stop;
xl2tpd -D;
route add -net 10.10.0.0 netmask 255.255.0.0 gw 10.1.43.253 dev eth0;
echo "c candy" > /var/run/xl2tpd/l2tp-control “为什么是candy?因为第一个配置文件里面是[lac candy],如果不想要candy,你可以用mummy或daddy,但是lac不能少“