lj0014
V2EX  ›  问与答

在 DO 上搭的 PPTP 可以拨号但无法上网

  •  
  •   lj0014 · Jul 18, 2014 · 4469 views
    This topic created in 4501 days ago, the information mentioned may be changed or developed.
    在DO上也设置iptables,求指点
    7 replies  •  2014-07-18 23:23:10 +08:00
    princeofwales
    princeofwales
    Jul 18, 2014
    1
    设置转发
    ericFork
    ericFork
    Jul 18, 2014
    2
    iptables -t nat -A POSTROUTING -s 你的vpn网段 -j MASQUERADE
    yellowV2ex
    yellowV2ex
    Jul 18, 2014
    3
    @ericFork 我知道这条命令也用过,里面的 你的vpn网段 我好想在哪个配置文件里见过,我想问 你的vpn网段 要怎么找回来或更改设置?
    leavic
    leavic
    Jul 18, 2014
    4
    2楼的命令好像漏了一部分,没有指明出口接口:
    iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

    192.168.9.0/24,取决于你/etc/pptpd.conf里的local IP,表示的是你VPN客户端分配的IP断.

    eth0修改成你的主机的物理网络接口,在虚拟机里一般是venet0之类的名称,用ifconfig可以查看到.
    ericFork
    ericFork
    Jul 18, 2014
    5
    @leavic 不指明则走默认路由
    usedname
    usedname
    Jul 18, 2014
    6
    pptp穿透性太差,为了安全着想还是换别的类型的vpn吧
    lj0014
    lj0014
    OP
    Jul 18, 2014
    7
    @ericFork
    @leavic
    设置后可以了。(为啥我原来也设置了不行?)

    @usedname 可能确实如你所说,没几下就掉线了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   977 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:39 · PVG 06:39 · LAX 14:39 · JFK 17:39
    ♥ Do have faith in what you're doing.