HUANGWANG'S BLOG

MC服务器流量端口转发

MC服务器流量端口转发

最近腐竹提供了几台海外的VPS,系统都是CentOS 7.4,准备使用iptable进行端口转发。选择iptable的原因主要还是其支持TCP/UDP,以前用的haproxy尽管配置比较简单,但是不支持UDP,想给其他游戏(像泰拉瑞亚)加速就无能为力了。

首先参考了一篇关于SS端口转发的教程,参照步骤,当执行到

1
service iptables save

保存iptable配置,控制台提示

1
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

看来这样的指令无法操作,将提示扔到Google搜索下,在Stackoverflow上有大佬回答,在RHEL 7/CentOS 7中,开始采用firewalld动态防火墙。这里使用将firewalld禁掉,采用iptables管理。(无奈之举,折腾了一晚上firewalld还是没搞懂,怕把VPS玩坏,改日用闲置的VPS再研究研究)

  • 停止firewalld

    1
    systemctl stop firewalld
  • 安装iptables-services

    1
    yum install iptables-services
  • 开启iptables

    1
    systemctl enable iptables

这样,后继再根据上述教程即可实现端口转发。同时,还要注意云服务器的安全组配置。

Blog搬至GayHub并开启小绿锁

由于Rectified Networks Inc.家被攻击了,VPS这段时间无法连接,将Blog迁至GitHub托管。DNS域名解析搬至cloudflare,小绿锁自动开启了owo。