使用xl2tpd程序,当使用客户端连接服务器的时候提示如下,不太明白到底哪里出了问题
xl2tpd[572]: Connecting to host 192.168.3.2, port 1701
xl2tpd[572]: Connection established to 192.168.3.2, 1701. Local: 18331, Remote: 1597 (ref=0/0).
xl2tpd[572]: Calling on tunnel 18331
xl2tpd[572]: Call established with 192.168.3.2, Local: 46902, Remote: 24090, Serial: 3 (ref=0/0)
xl2tpd[572]: start_pppd: I'm running:
xl2tpd[572]: "/usr/sbin/pppd"
xl2tpd[572]: "plugin"
xl2tpd[572]: "pppol2tp.so"
xl2tpd[572]: "pppol2tp"
xl2tpd[572]: "7"
xl2tpd[572]: "passive"
xl2tpd[572]: "nodetach"
xl2tpd[572]: ":"
xl2tpd[572]: "name"
xl2tpd[572]: "testvpn"
xl2tpd[572]: "debug"
xl2tpd[572]: "file"
xl2tpd[572]: "/etc/ppp/peers/options.xl2tpd"
xl2tpd[572]: Can not find tunnel 1597 (refhim=0)
xl2tpd[572]: network_thread: unable to find call or tunnel to handle packet. call = 24090, tunnel = 1597 Dumping.
xl2tpd[572]: Can not find tunnel 1597 (refhim=0)
xl2tpd[572]: network_thread: unable to find call or tunnel to handle packet. call = 24090, tunnel = 1597 Dumping.
xl2tpd[572]: Can not find tunnel 1597 (refhim=0)
xl2tpd[572]: network_thread: unable to find call or tunnel to handle packet. call = 24090, tunnel = 1597 Dumping.
xl2tpd[572]: Can not find tunnel 1597 (refhim=0)
xl2tpd[572]: network_thread: unable to find call or tunnel to handle packet. call = 24090, tunnel = 1597 Dumping.
xl2tpd[572]: Can not find tunnel 1597 (refhim=0)
xl2tpd[572]: network_thread: unable to find call or tunnel to handle packet. call = 24090, tunnel = 1597 Dumping.
xl2tpd[572]: control_finish: Connection closed to 192.168.3.2, serial 3 ()
xl2tpd[572]: Terminating pppd: sending TERM signal to pid 601
这里是我的配置文件,我的客户端ip为192.168.3.100,服务器ip为192.168.3.2:
客户端的配置文件
xl2tpd.conf文件
[lac vpn1]
name = testvpn
lns = 192.168.3.2
ppp debug = yes
pppoptfile = /etc/ppp/peers/options.xl2tpd
option.xl2tpd文件
remotename vpn1
user "testvpn"
password "123456"
unit 0
#lock
nodeflate
nobsdcomp
noauth
persist
nopcomp
noaccomp
maxfail 5
debug
服务器的配置文件
xl2tpd.conf文件
[global]
listen-addr = 192.168.3.2
port = 1701
auth file = /etc/ppp/chap-secrets
[lns default]
ip range = 192.168.3.2-192.168.3.200
local ip = 192.168.3.2
require chap = yes
refuse pap = yes
require authentication = yes
name = LinuxVPNserver
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
option.xl2tpd文件
remotename vpn1
user "testvpn"
password "123456"
unit 0
#lock
nodeflate
nobsdcomp
noauth
persist
nopcomp
noaccomp
maxfail 5
debug
chap-secrets文件
# Secrets for authentication using CHAP
# client server secret IP addresses
testvpn * 123456 *
服务器运行命令:
sudo xl2tpd -c /etc/xl2tpd/xl2tpd.conf -D
客户端运行命令:
sudo xl2tpd -c /etc/xl2tpd/xl2tpd.conf
echo 'c vpn1' > /var/run/xl2tpd/l2tp-control