linux(centos7)firewalld-cmd查看防火墙状态以及查看当前规则
思韵闪耀
2024-03-15
0

linux(centos7)firewalld-cmd查看防火墙状态以及查看当前规则

查看防火墙状态:

 [root@localhost ~]# firewall-cmd --state
running
[root@localhost ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-03-11 11:32:21 CST; 1min 30s ago
     Docs: man:firewalld(1)
 Main PID: 3353 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─3353 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
Mar 11 11:32:16 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Mar 11 11:32:21 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
查看当前规则:
firewalld uses zones to manage the traffic. If a zone is not specified by the --zone option, the command is effective in the default zone assigned to the active network interface and connection.To list all the relevant information for the default zone:
[root@localhost ~]# firewall-cmd --list-all --zone=public
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens33
  sources:
  services: dhcpv6-client http https ssh
  ports: 3306/tcp 443/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
For example, to see which services are allowed in the current zone:
[root@localhost ~]# firewall-cmd --list-services
dhcpv6-client http https ssh

 

【版权声明】
本站部分内容来源于互联网,本站不拥有所有权,不承担相关法律责任。如果发现本站有侵权的内容,欢迎发送邮件至masing@13sy.com 举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

相关内容

Linux系统挂载未分配硬...
先查看未挂载之前的磁盘使用情况发现磁盘使用率已经达到了96%,迫切...
2025-02-22
Linux lsblk 命...
简介Linux 中的 lsblk 命令,全称叫做:list blo...
2025-02-22
Ubuntu防火墙ufw的...
一、不使用IPv6打开UFW配置。sudo vim /e...
2024-12-28
ubuntu防火墙命令介绍
ubuntu在开启ufw防火墙前,为了避免与iptables现有规...
2024-07-21
linux内核5和6区别
Linux内核5.x和6.x版本之间有显著的区别,这些区别主要体现...
2024-04-29
ubuntu防火墙ufw详...
ubuntu防火墙为ufw,本文为大家介绍ubuntu系统防火墙的...
2024-04-28

热门资讯

SIOCADDRT: Netw... SIOCADDRT: Network is unreachable SIOCADDRT: 网络不可达...
centos7下创建新用户和组 linux下添加,删除,修改,查看用户和用户组 1 .增加一个test组 groupadd test...
linux通过sed 修改文件... 13sy.txt里面内容如下 A; B; C; write by luohao199621; 1.要...
关于cannot remove... 关于cannot remove directory: Directory not empty的解决办...
mount: unknown ... mount: unknown filesystem type LVM2_member解决方案 系统启...
OpenMediaVault安... OpenMediaVault 是一个基于Debian的专用 Linux 发行版,用于构建网络连接存储...
centos7 双网卡双网关的... 最近公司需要在一台服务器上同时使用内网和外网,并且都需要跨网段访问,因此需要双网关,但是一台机子上只...
ethtool 命令详解 1 概述 ethtool 是用于查询及设置网卡参数的命令。 2 命令详解 2.1 命令格式 (1) ...
CentOS7单网卡设置双IP... linux系统CentOS7单网卡设置双IP的方法,centos7.5、7.6、7.7设置双IP教程...
Linux进程状态D,S,Z的... Linux进程状态top,ps中看到进程状态D,S,Z的含义 在top和ps命令中有一列显示进程状态...