centos7.6搭建pptp服务器

https://www.cnblogs.com/tom-blogs/p/12163366.html
https://zhuanlan.zhihu.com/p/347406018
https://blog.csdn.net/weixin_34260991/article/details/92868802
1.查看日志
tail -200 /var/log/messages

2.报错
Sep 15 18:14:26 servers pptpd[6064]: GRE: read(fd=6,buffer=55e131ce6480,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Sep 15 18:14:26 servers pptpd[6064]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Sep 15 18:14:26 servers pptpd[6064]: CTRL: Client 10.10.16.66 control connection finished

这个报错是由于localip 设置得不对,应该为外网ip

Ubuntu无法上外网问题
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
防火墙按照下面方法配置:
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source 你的公网IP
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

解决两端无法互通问题
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

猜你喜欢

转载自blog.csdn.net/qq_38595432/article/details/120314448