用iptables命令操作CentOS防火墙

1  常用命令如下:

查询防火墙状态:service   iptables status
停止防火墙: service   iptables stop
启动防火墙:service   iptables start
重启防火墙:service   iptables restart
永久关闭防火墙:chkconfig   iptables off
永久关闭后启用:chkconfig   iptables on

2  编辑/etc/sysconfig/iptables文件,可以进行修改防火墙的配置信息,将需要对外提供的端口暴露出来

猜你喜欢

转载自www.cnblogs.com/zxq-Study-Java/p/9959995.html
今日推荐