vpn搭建完了,但是链接不上,不知道问题出在哪里
按照网上说的攻略使用ppp和pptpd搭建vpn服务
pptpd-1.3.4-2.el6.x86
64.rpm
ppp-2.4.5-5.el6.x86
64
日志信息
pppd[7340]: Using interface ppp0
pppd[7340]: Connect: ppp0 <--> /dev/pts/3
pppd[7340]: LCP: timeout sending Config-Requests
pppd[7340]: Connection terminated.
pppd[7340]: Modem hangup
pppd[7340]: Exit.
pptpd[7339]: GRE: read(fd=6,buffer=611860,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
pptpd[7339]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
pptpd[7339]: CTRL: Client 221.232.xx.xx control connection finished
/etc/pptpd.conf 内容
option /etc/ppp/options.pptpd
localip 172.16.36.1
remoteip 172.16.36.2-254
/etc/ppp/options.pptpd 内容
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
debug
dump
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4
iptables 信息
iptables -t nat -A POSTROUTING -s 172.16.36.0/24 -j SNAT --to-source `ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk 'NR==1 { print $1}'`
iptables -A FORWARD -p tcp --syn -s 172.16.36.0/24 -j TCPMSS --set-mss 1356
/etc/sysctl.conf修改部分
#net.ipv4.ip_forward = 0
net.ipv4.ip_forward = 1
#net.ipv4.tcp_syncookies = 1
IORIKYO
11 years, 5 months ago