首页 > 解决方案 > 连接到 pptp vpn 时无法访问任何网站

问题描述

测试服务器:

中国服务器无法访问Gooogle、Facebook、Instagram、Twitter,但你可以尝试使用它测试连接到stackoverflow

ip: 132.232.70.189
account: yunaqi
password: qishi

我在服务器上做了什么:

安装pptp

sudo yum -y install pptpd

编辑 sysctl.conf

vi /etc/sysctl.conf
net.ipv4.ip_forward=1

编辑 pptpd.conf

vi /etc/pptpd.conf
localip 192.168.0.1
remoteip remoteip 192.168.0.234-238,192.168.0.245

编辑章节秘密

vi /etc/ppp/chap-secrets
yuanqi  * qishi *

配置iptables

sudo iptables -A INPUT -p gre -j ACCEPT 
sudo iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 47 -j ACCEPT
sudo iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -o eth0 -j MASQUERADE

启动pptp

systemctl enable pptpd.service
systemctl start pptpd.service

就是这样,我不知道哪一步错了。请帮助我。

标签: linuxcentoscentos7pptp

解决方案


推荐阅读