

1.查看防火墙状态systemctl status firewalld、 firewall-cmd --state
2.暂时关闭防火墙systemctl stop firewalld
3.永久关闭防火墙systemctl disable firewalld
4.开启防火墙systemctl start firewalld
5.开放指定端口firewall-cmd --zone=public --add-port=8080/tcp --permanent
6.关闭指定端口firewall-cmd --zone=public --remove-port=8080/tcp --permanent
7.立即生效firewall-cmd --reload
8.查看开放的端口firewall-cmd --zone=public --list-ports
本文介绍了Linux系统中防火墙的相关操作命令,包括查看防火墙状态、暂时或永久关闭防火墙、开启防火墙、开放或关闭指定端口、使配置立即生效以及查看开放端口等,为Linux运维和服务器管理提供了实用的操作指南。
1327

被折叠的 条评论
为什么被折叠?



