V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
morethansean
V2EX  ›  VPS

ocserv 无法联网求教

  •  
  •   morethansean · Dec 26, 2015 · 1252 views
    This topic created in 3778 days ago, the information mentioned may be changed or developed.

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

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

    2 replies    2015-12-26 21:35:38 +08:00
    002jnm
        1
    002jnm  
       Dec 26, 2015 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
       Dec 26, 2015
    把 vpns 网卡添加到 nat 那句里解决了...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   878 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 22:11 · PVG 06:11 · LAX 15:11 · JFK 18:11
    ♥ Do have faith in what you're doing.