码迷,mamicode.com
首页 > 系统相关 > 详细

linux-日常运维-firewalld的9个zone

时间:2018-10-30 00:20:49      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:ace   image   一个   默认   process   text   cmd   9.png   linux   

打开firewalld
systemctl disable iptables #在开机时禁用服务
systemctl stop iptables #停止 iptables 服务
systemctl enable firewalld #在开机时启用服务
systemctl start firewalld #开启firewalld服务
firewalld默认有9个zone #zone是firewalld的一个单位,默认zone为public,每个zone相当于一个规则集,zone自带一些规则.

firewall-cmd --get-zones //查看所有zone
firewall-cmd --get-default-zone //查看默认的zone
技术分享图片
zone的区别

firewall-cmd --set-default-zone=work             //设定默认zone

技术分享图片
firewall-cmd --get-zone-of-interface=eth0 //查指定网卡 #如果看到是no zone ,重启一下网卡就看到了
技术分享图片
firewall-cmd --zone=public --add-interface=eth0 //给指定网卡设置zone
firewall-cmd --zone=dmz --change-interface=eth0 //针对网卡更改zone
firewall-cmd --zone=dmz --remove-interface=eth0 //针对网卡删除zone
firewall-cmd --get-active-zones //查看系统所有网卡所在的zone
技术分享图片

linux-日常运维-firewalld的9个zone

标签:ace   image   一个   默认   process   text   cmd   9.png   linux   

原文地址:http://blog.51cto.com/13451715/2310457

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!