第一次在LINODE 上装PPTP VPN, 能登陆VPN,但上不了网,不知道什么情况,有懂的朋友帮忙看一下!

2012-08-04 11:34:23 +08:00
 btwo
PPP adapter VPN:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.217.234
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 192.168.217.234
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4

有点奇怪,默认的网关不应该是VPN的服务器IP吗?192.168.217.1?

iptables:

root@mail:/etc/init.d# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 192.168.9.0/24 anywhere
MASQUERADE all -- 192.168.217.0/24 anywhere

http://www.vpser.net/manage/linode-vps-pptp-vpn-howto.html 参考这篇文章做的!
5966 次点击
所在节点    Linode
43 条回复
ywencn
2012-08-04 12:03:18 +08:00
PPTP部分被墙,装个openVPN吧
ratazzi
2012-08-04 12:09:56 +08:00
看下你本地路由器 MTU 是否太小,PPPoE 应该是 1492
btwo
2012-08-04 12:18:52 +08:00
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip 下面有很多个MTU 都是1300 ,修改了十四号
@ratazzi
ivanlw
2012-08-04 12:21:03 +08:00
@ywencn 受教了……怎么知道PPTP部分被墙的?怪不得我用同一个VPN服务,PPTP就几乎不能翻,但是openvpn就很稳定……

另:如果PPTP这种情况,iPhone上有什么合适的翻墙方案吗?
eric_q
2012-08-04 12:23:03 +08:00
iptables 设置了 nat 了没
ratazzi
2012-08-04 12:36:06 +08:00
@btwo 我说的是路由器不是你本机哦,PPTP 穿透能力太差,能 OpenVPN 最好了
@eric_q 楼主贴的数据 Chain POSTROUTING MASQUERADE 部分就是 NAT
terry0824
2012-08-04 12:39:53 +08:00
@ratazzi 但是能连上pptp但是上不去网的问题多半不是pptp被强吧?iptables设置不合适的可能性大一些。
ratazzi
2012-08-04 12:44:54 +08:00
@terry0824 目测 iptables 正确,MTU 也很重要,曾经一个朋友因为 MTU 的问题就是能够链接,但是不能上网
@btwo 要不楼主搞个临时帐号给我们测试一下就知道是服务器的问题或者客户端的问题
terry0824
2012-08-04 14:34:55 +08:00
@ratazzi 刚才在帮朋友设置pptp连接的时候也出现了能连接上但是没数据的情况,看来确实是跟客户端网络情况有关的,后来帮那人换了个L2TP OVER IPSEC的就可以了。MTU的问题之前在用ios和macos做客户端连l2tp的时候遇到过,pptp还真没遇到过,怀疑跟路由器穿透有关。

@btwo 既然是linode的xen,可以装一个L2TP over IPSEC的,也不麻烦,ios系统用起来也很方便。
jjgod
2012-08-04 16:41:15 +08:00
建议改用 L2TP over IPSec.
btwo
2012-08-04 21:17:58 +08:00
各位:有L2TP over IPSec 的安装教程吗?最好是已经验证过的,不是想吃现成的,实在是不想太折腾了!!谢谢各位了!
btwo
2012-08-04 21:19:08 +08:00
PPTP的帐号 btwo/phoenix 主机是106.187.102.170
donnior
2012-08-04 21:22:02 +08:00
@btwo 使用Linode上已有的stackscript,一键安装,这里有一个
http://www.linode.com/stackscripts/view/?StackScriptID=2660
donnior
2012-08-04 21:23:05 +08:00
还有,不要用8.8.8.8, 用8.8.4.4, 不然可能碰到能连上但是不能上网的诡异问题。
lovejoy
2012-08-04 21:27:13 +08:00
我记得每次都要ssh运行下脚本
btwo
2012-08-04 21:33:15 +08:00
@donnior 我现在又该下试试!
terry0824
2012-08-04 21:34:24 +08:00
刚用楼主提供的信息测试了一下,感觉pptp的问题也是楼主配置上可能有一些不正确的地方……具体不好说。至少我家的网络环境在使用其他地方的pptp服务时不会有问题,但用楼主的就确实是能连上但是不走数据
btwo
2012-08-04 21:48:18 +08:00
@terry0824 我现在很困惑,那个文档有问题还是有什么其他办法确定一下问题呢?
terry0824
2012-08-04 21:54:50 +08:00
@btwo 看了一下跟我的配置方法是一样的……
btwo
2012-08-04 22:15:28 +08:00
@donnior

Version check and ipsec on-path [OK]
Linux Openswan U2.6.24/K3.4.2-linode44 (netkey)
Checking for IPsec support in kernel [OK]
NETKEY detected, testing for disabled ICMP send_redirects [OK]
NETKEY detected, testing for disabled ICMP accept_redirects [OK]
Checking for RSA private key (/etc/ipsec.secrets) [OK]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [OK]
Pluto listening for NAT-T on udp 4500 [OK]
Two or more interfaces found, checking IP forwarding [OK]
Checking NAT and MASQUERADEing
Checking for 'ip' command [OK]
Checking for 'iptables' command [OK]
Opportunistic Encryption Support [DISABLED]
ipsec_setup: Stopping Openswan IPsec...
ipsec_setup: Starting Openswan IPsec U2.6.24/K3.4.2-linode44...
Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Linux Openswan U2.6.24/K3.4.2-linode44 (netkey)
Checking for IPsec support in kernel [OK]
NETKEY detected, testing for disabled ICMP send_redirects [OK]
NETKEY detected, testing for disabled ICMP accept_redirects [OK]
Checking for RSA private key (/etc/ipsec.secrets) [OK]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [OK]
Pluto listening for NAT-T on udp 4500 [OK]
Two or more interfaces found, checking IP forwarding [OK]
Checking NAT and MASQUERADEing
Checking for 'ip' command [OK]
Checking for 'iptables' command [OK]
Opportunistic Encryption Support [DISABLED]

自动脚本安装的结果, IPAD 连接不到服务器,晕了, 对了脚本中有几个包的地址失效了,需要网上找替换的地址!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/44254

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX