我的方案如下,需要使用pptp (或其他如OpenVpn或l2pt)在Ubuntu中创建网络接口,而不干扰其他接口,因此只能与以下命令一起使用:
wget http://ipinfo.io/ip -qO - --bind-address 10.200.21.3 (其中10.200.21.3是IP接口pptp)
我设法做到了以下所有这些
sudo apt-get install linux-pptp network-manager-pptp
sudo pptpsetup --create VPN2 --server 186.227.xx.xx --username MyUser --encrypt
sudo pon VPN2然后使用动态本地IP (例如,ppp0 )创建10.200.21.3接口,但是仍然无法访问,那么:
ip route add default via 10.200.21.3 dev ppp0 table 10
ip rule add from 10.200.21.3 table 10在此之后,我可以使用完美的命令:
wget http://ipinfo.io/ip -qO - --bind-address 10.200.21.3但是都有问题,我需要静态IP接口(在示例10.200.21.3中),但是pptp服务器发送给我一个动态IP,有什么方法来模拟它吗?
发布于 2016-08-24 05:33:06
检查您的PPTP服务器配置(/etc/ppp/chap-secrets)。将静态IP放在IP address列下。
示例:
更改如下:
# * * "" *
# Secrets for authentication using CHAP
# client server secret IP addresses
MyUser pptpd mypassword *改为:
# * * "" *
# Secrets for authentication using CHAP
# client server secret IP addresses
MyUser pptpd mypassword 10.200.21.3此解析使用一对匹配的客户端(/etc/pptp/peers/peername)和服务器(/etc/pptp/chap-secrets)。可在以下站点找到快速设置:
http://faq.apollo3.com/ljames/ubuntu/vpn/
https://askubuntu.com/questions/816064
复制相似问题