centos更改防火墙配置文件iptables

2025-04-15 23:28:12

1、登录服务器。查看防火墙启动状态。service iptables status

centos更改防火墙配置文件iptables

2、关闭防火墙service iptables stop

centos更改防火墙配置文件iptables

3、启动防火墙service iptables start

centos更改防火墙配置文件iptables

4、查看规则列表iptables --list-rules

centos更改防火墙配置文件iptables

5、编辑规则vim /etc/sysconfig/iptables加入一行-A I鲍伊酷雪NPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT

centos更改防火墙配置文件iptables

6、保存,重启防火墙service iptables restart

centos更改防火墙配置文件iptables

7、查看规则iptables --list-rules

centos更改防火墙配置文件iptables
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢