目录
- 1. 安装 firewalld 防火墙
- 2. firewalld 基本命令
- 3. firewall-cmd 基本命令
【注】在 Centos7
下默认的防火墙变成了 firewalld
,而不再是之前的 iptables
,如果买阿里云或者腾讯云的服务器的话一般是没有防火墙的需要自己进行安装。
【注】其实 firewalld
并不具备防火墙的功能,而是和 iptables
一样,他们两者仅仅是维护规则,真正起到防火墙作用的是 内核中的 netfilter
。
1. 安装 firewalld 防火墙
yum install firewalld
2. firewalld 基本命令
其实就是 systemctl
命令的使用,在 Centos 7
系统中推荐 systemctl
来代替 service
。
当然如果不习惯的话也可以继续使用 service
,但是呢,其实命令还是会自动的重定向到 systemctl
并使用该命令。
systemctl status firewalld
service firewalld status
systemctl start firewalld
service firewalld start
systemctl stop firewalld
service firewalld stop
systemctl disable firewalld
systemctl enable firewalld
3. firewall-cmd 基本命令
【注】执行的时候需要 root
权限。
更多使用命令,不定期进行更新补充。。。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)