V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
morethansean
V2EX  ›  VPS

ocserv 无法联网求教

  •  
  •   morethansean · 2015-12-26 20:45:14 +08:00 · 740 次点击
    这是一个创建于 3053 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天在 VPS 上搭了一个 ocserv, anyconnect 能够连接,但是无法联网。
    iptables 和 firewalld 都关掉了,系统是 centos7.
    弄了半天都不行。然后去网上搜到了一个一键安装的脚本,于是试了一下,也是不能联网。他的配置自带了 route ,于是只有国内的能连,走 route 的都不行。注释掉 route 就一样无法上网了。
    anyconnect 里看 detail , received 的数据包一直是 0.

    然后现在不知道应该如何定位问题了,求大神帮助啊……

    2 条回复    2015-12-26 21:35:38 +08:00
    002jnm
        1
    002jnm  
       2015-12-26 20:50:42 +08:00 via iPhone
    iptables 添加这俩规则
    iptables -t nat -A POSTROUTING -j MASQUERADE
    iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
    ip 转发开启
    net.ipv4.ip_forward = 1
    morethansean
        2
    morethansean  
    OP
       2015-12-26 21:35:38 +08:00
    把 vpns 网卡添加到 nat 那句里解决了...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3565 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:57 · PVG 12:57 · LAX 21:57 · JFK 00:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.