linux - iptables
主机防火墙:主要是用来防范单台主机的进出报文;-----filter表·
网络防火墙: 能够实现对进出本网络的所有主机报文加以防护----nat表
iptables 表:

iptables 链:

表和链之间的关系:

iptables 命令:
查看filter表:
# iptables -t filter --list
查看NAT表:
# iptables -t nat --list
全部查看:
# iptables --list
对于启用了 iptables 的主机(RHEL、CentOS 等),您可以使用 iptables 命令来启用进入特定端口的所有流量。 使用以下命令允许 访问 9000 端口
iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
service iptables restart
下面的命令启用所有传入端口的流量,范围从 9000 到 9010。
iptables -A INPUT -p tcp --dport 9000:9010 -j ACCEPT
posted on 2022-02-25 14:36 TrustNature 阅读(51) 评论(0) 收藏 举报
                    
                
                
            
        
浙公网安备 33010602011771号