好男人视频社区,久久99国产精品尤物,大宫凉香电影,国外巨g乳熟妇av无码,天天日天天舔天天操,久久综合久色综合97婷婷,99久久久成人国产精品 ,4438亚洲最大色情网

Centos7設置iptables中轉

/ 2評 / 0贊

說明:一般用海外服務器的都會遇到線路爆炸,網絡不好的情況,導致我們用的效果很差,這時候就可以用端口轉發來改善這種情況,常見的轉發有rinetd、Haproxy、iptables、socat,前面2種只能轉發TCP,后面TCP/UDP都可以轉發,如果用來玩游戲的話就需要轉發UDP了。

1.下載Centos源:

http://mirrors.aliyun.com/centos/7/isos/x86_64/.

2.安裝centos7

3.關閉firewalld防火墻

systemctl stop firewalld.service

systemctl disable firewalld.service

4.安裝wget

yum -y install wget

5.編輯網卡

vi /etc/sysconfig/network-scripts/ifcfg-ens3

編輯 ONBOOT=yes

6.安裝一鍵腳本

wget --no-check-certificate -qO natcfg.sh http://www.arloor.com/sh/iptablesUtils/natcfg.sh && bash natcfg.sh

 

wget --no-check-certificate -qO natcfg.sh https://raw.githubusercontent.com/arloor/iptablesUtils/master/natcfg.sh && bash natcfg.sh

 

7.設置本地/目的端口 目的服務器ip即可。

 

8.保存

    service iptables save

執行這個命令的時候有時候可能會報錯: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.

這是因為沒有安裝iptables服務,直接使用yum安裝iptables服務即可.

    yum install iptables-services

安裝完成后,重新執行 service iptables save 命令即可保存成功。

 

9.配置iptables開機自啟

 保存后重啟依然沒有生效,后百度得知,需要設置iptables開機自啟才可使配置生效。

 執行如下命令(老版本命令為:service iptables on),設置iptables開機自啟

     systemctl enable iptables.service

 

建偉

  1. 建偉說道:

    學習了

  2. 建偉說道:

    留言是種美德,寫點什么…

發表評論

您的電子郵箱地址不會被公開。

這個站點使用 Akismet 來減少垃圾評論。了解你的評論數據如何被處理。