CentOS7使用firewalld管理防火墙与端口
firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld
开机禁用 : systemctl disable firewalld
systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed
配置firewalld-cmd
查看版本: firewall-cmd --version
查看帮助: firewall-cmd --help
显示状态: firewall-cmd --state
查看所有打开的端口: firewall-cmd --zone=public --list-ports
更新防火墙规则: firewall-cmd --reload
查看区域信息: firewall-cmd --get-active-zones
查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
拒绝所有包:firewall-cmd --panic-on
取消拒绝状态: firewall-cmd --panic-off
管理端口
添加:
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
重新载入:
firewall-cmd --reload
查看:
firewall-cmd --zone= public --query-port=80/tcp
删除:
CentOS7使用firewalld管理防火墙与端口的更多相关文章
- CentOS7使用firewalld管理防火墙
firewalld的基本使用 #启动 systemctl start firewalld #关闭 systemctl stop firewalld #查看状态 systemctl status fir ...
- CentOS 使用firewalld打开防火墙与端口
CentOS 使用firewalld打开防火墙与端口 LinuxCentOS 基本使用 启动 : systemctl start firewalld 关闭 : systemctl stop firew ...
- Centos7管理selinux及使用firewalld管理防火墙
CentOS 7.0默认使用的是firewall作为防火墙 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status ...
- Linux学习笔记之CentOS 7系统使用firewalld管理防火墙端口
0x00 firewalld的基本使用 # 启动: systemctl start firewalld # 查看状态: systemctl status firewalld # 停止: systemc ...
- CentOS7使用打开关闭防火墙与端口
systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体. 启动一个服务:systemctl start firewalld.servic ...
- Centos7 使用firewall管理防火墙
一.Centos7使用firewall的管理防火墙 1.firewalld基本使用 启动:systemctl start firewalld 关闭:systemctl stop firewalld 状 ...
- firewalld管理防火墙常用命令
1.查看防火墙的状态 [root@localhost HMK]# firewall-cmd --state 查看防火墙的运行状态 not running [root@localhost HMK]# s ...
- CentOS7.3 下开放防火墙的端口
CentOS 7.3默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1:关闭firewall: systemctl stop firewalld.service system ...
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
随机推荐
- python文件读写 文件修改
#设置一个变量f为文件对象,并打开文件#写文件#f = open('user.txt','w',encoding='utf-8') #f是一个文件对象f=open(r'c:\Users\PL\Desk ...
- xls文件转化txt
xls文件转化txt # -*- coding:utf-8 -*- # 安装pywin32包 http://sourceforge.net/projects/pywin32/files/pywin32 ...
- [JSOI2019]精准预测(2-SAT+拓扑排序+bitset)
设第i个人在t时刻生/死为(x,0/1,t),然后显然能够连上(x,0,t)->(x,0,t-1),(x,1,t)->(x,1,t+1),然后对于每个限制,用朴素的2-SAT连边即可. 但 ...
- [NOIP 2002普及组]产生数(floyd+高精度)
https://www.luogu.org/problem/P1037 题目描述 给出一个整数 n(n<1030) 和 k 个变换规则(k<=15). 规则: 一位数可变换成另一个一位数: ...
- facebook第三方登陆(使用sharedSDK)无法加载网址:这个URL的域名未包含应用的域名
http://bbs.mob.com/forum.php?mod=viewthread&tid=8134&extra=page%3D1
- Windows2012R2 设置NTP时间服务器
一.服务端配置 (Ntp服务器,客户端将根据这台服务器的时间进行同步) 1.微软键+R键,进入“运行”,输入“regedit”,进入注册表 2. HKEY_LOCAL_MACHINE\SYSTEM\C ...
- 100)PHP,文件上传总代码整理
首先是我的目录关系: 然后我的html表单代码: <html> <head> <title>Form</title> <meta http-equ ...
- 常用面试sql(1)
1:update qr_user_info set score =score+50 where level=3 2:delete from qr_user_info where level is nu ...
- 树形dp(最小支配集)
http://poj.org/problem?id=3659 #include<iostream> #include<cstring> #include<algorith ...
- The Queen's Super-circular Patio 求栏杆
Input The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of da ...