V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
t1anea
V2EX  ›  Linux

新人关于 iptables 转发问题

  •  
  •   t1anea · Feb 9, 2017 · 2285 views
    This topic created in 3369 days ago, the information mentioned may be changed or developed.

    我想自己制作一个游戏加速器来实现美服游戏加速的效果

    各种 VPS 都无法满意情况下 别人给我说了一个方法即

    本地网络---国内中转服务器---( GPN )----美国服务器---游戏服务器

    通过国内中转服务器和美国服务器组成 GPN 专线 来实现中国到美国这一条线路稳定不掉包

    之后在美国架设 SS 直接连接国内中转服务器

    在成功组件了 GPN 网络之后,在 CENTOS 7 X64 系统下 我无法保存我配置的 iptables 转发规则。

    注:本人( LINUX 菜鸡)没有学习过相关知识,只会通过百度搜索到的命令进行操作。一旦出现问题百度搜不到的就卡主无法进行下一步。

    所以我想请教一下

    我想问我要玩美服加速通过上述方案是否可以解决掉包的问题,延迟没所谓。

    可以有人可以指导我一下 iptables 转发吗。

    4 replies    2017-02-11 17:41:10 +08:00
    dawncold
        1
    dawncold  
       Feb 9, 2017
    建议这种情况下,用 google 代替百度,别的就没有问题了。
    t1anea
        2
    t1anea  
    OP
       Feb 11, 2017
    @dawncold 感谢你的回复
    t1anea
        3
    t1anea  
    OP
       Feb 11, 2017
    劳烦可以搞定的大神留个联系方式 感谢
    t1anea
        4
    t1anea  
    OP
       Feb 11, 2017
    root@localhost:~# iptables -nvL -t nat
    Chain PREROUTING (policy ACCEPT 91 packets, 5923 bytes)
    pkts bytes target prot opt in out source destination
    24 1216 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8989 to:192.168.2.15:8989
    0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:8989 to:192.168.2.15:8989

    Chain INPUT (policy ACCEPT 91 packets, 5923 bytes)
    pkts bytes target prot opt in out source destination

    Chain OUTPUT (policy ACCEPT 15 packets, 1084 bytes)
    pkts bytes target prot opt in out source destination

    Chain POSTROUTING (policy ACCEPT 15 packets, 1084 bytes)
    pkts bytes target prot opt in out source destination
    0 0 SNAT tcp -- * * 0.0.0.0/0 192.168.2.15 tcp dpt:8989 to:192.168.2.20
    0 0 SNAT udp -- * * 0.0.0.0/0 192.168.2.15 udp dpt:8989 to:192.168.2.20

    192.168.2.15 是美国的 GPN IP
    192.168.2.20 是北京的 GPN IP
    请问以上 iptable 转发规则规则是否生效?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   762 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 21:17 · PVG 05:17 · LAX 14:17 · JFK 17:17
    ♥ Do have faith in what you're doing.