centos开放iptables防火墙指定端口范围
小编:动力软件园 时间:2018-07-13 15:42:34
客户需求:需要39000至40000之间的端口都能tcp访问
[root@MyCloudServer ~]# iptables -t filter -I INPUT -p tcp --dport 39000:40000 -j ACCEPT
[root@MyCloudServer ~]# service iptables save
这样就搞定了,一句就可以了,下面再多讲几句iptables防火墙一些规则。
一、 xxx:xxx表示xxx到xxx之间的所有端口
二、 :xxx表示xxx及以下所有端口
三、 xxx: 表示xxx以及以上所有端口
相关阅读
排行榜