firewall防火墙常用操作
# firewall防火墙常用操作
- 启动
```
systemctl start firewalld
```
- 停止
```
systemctl stop firewalld
```
- 重启
```
systemctl restart firewalld
```
- 添加端口
```
firewall-cmd --zone=public --add-port=82/tcp --permanent
```
- 查看端口
```
firewall-cmd --zone=public --list-ports
```
- 移除端口
```
firewall-cmd --zone=public --remove-port=8080/tcp --permanent
```
- 重新加载
```
firewall-cmd --reload
```
- 常见的几个端口加入防火墙
```
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=7925/tcp --permanent
```