Linux Centos防火墙相关操作命令

防火墙基础操作

shell 复制代码
#开启防火墙
systemctl start firewalld
shell 复制代码
#关闭防火墙
systemctl stop firewalld

重新加载防火墙规则(改了规则后均需执行)

shell 复制代码
firewall-cmd --reload

防火墙开放某端口

shell 复制代码
firewall-cmd --permanent --add-port=8080/tcp

防火墙禁用某ip访问

shell 复制代码
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.0.9" drop'

防火墙查看当前规则

shell 复制代码
firewall-cmd --list-all

防火墙移除某条规则

shell 复制代码
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="192.168.0.9" drop'
相关推荐
loong_XL3 小时前
docker gpu容器镜像环境构建
运维·docker·容器
杨了个杨89824 小时前
nginx常见功能部署
运维·服务器·nginx
小天源6 小时前
linux漏洞一键扫描
linux·运维·服务器·漏洞扫描
eWidget6 小时前
InfluxDB迁移至金仓数据库的同城容灾实践:性能显著提升、运维效率优化,某能源企业实现RPO_5秒的高可靠时序数据管理
运维·数据库·能源·时序数据库·kingbase·kingbasees·金仓数据库
m0_696212686 小时前
个人微信api
运维·服务器
en-route7 小时前
SSH Key 与 GPG Key 区别详解:Git 使用中的身份与签名机制
运维·git·ssh
码农水水7 小时前
中国邮政Java面试被问:容器镜像的多阶段构建和优化
java·linux·开发语言·数据库·mysql·面试·php
wifi chicken8 小时前
Linux Wlan L3~L2封包逻辑详解
linux·网络·ping·封包
小白鸽i9 小时前
【LINUX】将源码驱动文件编译并生效
linux·运维·服务器
做萤石二次开发的哈哈10 小时前
萤石开放平台 音视频 | 产品概述
运维·服务器·萤石云·萤石·萤石开放平台