三、配置ppp与l2tp
1.配ppp
vi /etc/ppp/options.xl2tpd
require-mschap-v2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
2.vpn用户名密码配置
vi/etc/ppp/chap-secrets
# client server secret IP addresses
tan * tan *
3.配置xl2tpd
vi /etc/xl2tpd/xl2tpd.conf
[global]
[lns default]
ip range = 192.168.201.170-192.168.201.179
local ip = 192.168.201.12
require chap = yes
refuse pap = yes
require authentication = yes
name = LinuxVPNserver
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
4.启动xl2tpd
/etc/init.d/xl2tpd restart
xl2tpd -D [以打印日志模式启动]
四、防火墙配置
配置转发
iptables -t nat -A POSTROUTING -s 192.168.201.0/24 -o eth0 -j MASQUERADE
|