CentOS7 防火墙 firewall-cmd
最小化安装 CentOS7 后,很多端口默认是不打开的,需要通过 firewall-cmd 把这些端口打开。
检查防火墙状态
# firewall-cmd --state
running
关闭防火墙
# systemctl stop firewalld
# firewall-cmd --state
not running
查看开放端口列表
# firewall-cmd --list-all
public (default, active)
interfaces: docker0 enp0s3
sources:
services: dhcpv6-client ssh
ports:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
暂时开放http 服务
# firewall-cmd --add-service=http
永久开放http 服务
# firewall-cmd --add-service=http --permanent
永久关闭http 服务
# firewall-cmd --remove-service=http --permanent
让设定生效
# systemctl restart firewalld
获取FirewallD 的服务名称
# firewall-cmd --get-service
amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https
查询服务的启用状态
# firewall-cmd --query-service http
yes
开放指定的端口
# firewall-cmd --add-port=/tcp
# firewall-cmd --list-all
public (default)
interfaces:
sources:
services: dhcpv6-client ftp ssh
ports: /tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
CentOS7 防火墙 firewall-cmd的更多相关文章
- CentOS7防火墙firewall相关操作
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
- centos7防火墙--firewall
centos7的防火墙变成firewall了 systemctl start firewalld.service#启动firewallsystemctl stop firewalld.service# ...
- CentOS7 防火墙Firewall常用命令
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
- CentOS7防火墙firewall
一.Firewall 1. 从CentOS7开始,默认使用firewall来配置防火墙,没有安装iptables(旧版默认安装). 2. firewall的配置文件是以xml的格式,存储在 /usr/ ...
- CentOS7下Firewall防火墙配置用法详解
官方文档地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide ...
- CentOS7 防火墙(firewall)的操作命令
CentOS7 防火墙(firewall)的操作命令 安装:yum install firewalld 1.firewalld的基本使用 启动: systemctl start firewalld 查 ...
- Centos7 使用firewall管理防火墙
一.Centos7使用firewall的管理防火墙 1.firewalld基本使用 启动:systemctl start firewalld 关闭:systemctl stop firewalld 状 ...
- RHEL7、CentOS7防火墙管理
经常start.stop.restart操作防火墙有两种方式: 1.service iptables stop 2./etc/init.d/iptables stop 但是经常会有这种错误,因为在RH ...
- Centos7防火墙快速开放端口配置方法
▲这篇文章主要为大家详细介绍了Centos7防火墙开放端口的快速方法,感兴趣的小伙伴们可以参考一下! Firewalld服务是红帽RHEL7系统中默认的防火墙管理工具,特点是拥有运行时配置与永久配置选 ...
- CentOS7 防火墙设置
CentOS7 防火墙命令 最近在公司服务器上安装了oracle12c数据库,在用数据库客户端连接的时候,连接不了.最后查找资料的原因是因为oracle的服务端口未开放. 首先还是还是输入以往的开启某 ...
随机推荐
- 恩布企业 IM 安卓端 1.3,服务端 1.12 公布
恩布企业IM的 Android 安卓开源手机client EntboostIM 公布 1.3 版本号.同一时候恩布IM服务端更新至 1.12 版本号; 安卓端主要更新内容: 添加收发手机文件功能: 登 ...
- OpenCV 编程简单介绍(矩阵/图像/视频的基本读写操作)
PS. 因为csdn博客文章长度有限制,本文有部分内容被截掉了.在OpenCV中文站点的wiki上有可读性更好.而且是完整的版本号,欢迎浏览. OpenCV Wiki :<OpenCV 编程简单 ...
- Hot Days Codeforces Round #132 (Div. 2) D(贪婪)
Description The official capital and the cultural capital of Berland are connected by a single road ...
- 安装好.net framework后运行慢
表现 系统有时运行慢,尤其是.net程序运行得相当慢 mscorsvw.exe与mscorsvw.exe *32两个进程挂在任务管理器里时不时地占着CPU 解决 运行以下两条命令,加快这两进程的运行, ...
- volatile解析(转)
Java并发编程:volatile关键字解析 volatile这个关键字可能很多朋友都听说过,或许也都用过.在Java 5之前,它是一个备受争议的关键字,因为在程序中使用它往往会导致出人意料的结果.在 ...
- [Elasticsearch] 邻近匹配 (三) - 性能,关联单词查询以及Shingles
提高性能 短语和邻近度查询比简单的match查询在性能上更昂贵.match查询仅仅是查看词条是否存在于倒排索引(Inverted Index)中,而match_phrase查询则须要计算和比較多个可能 ...
- MySQL Full Join的实现
MySQL Full Join的实现 由于MySQL不支持FULL JOIN,以下是替代方法 left join + union(可去除反复数据)+ right join select * from ...
- 依法使用Linux,反对Linux国产化
10月28日.中国操作系统应用推广大会在京举行,包含中央办公厅.公安部.工信部在内的多个中央国家机关部委出席该会.此次推广大会的召开或标志着操作系统国产化进程的进一步推进. 会上.中国project院 ...
- ORACLE 11G没有备份文件參数文件在异机通过rman备份恢复找回被误删的数据
背景: 同事误删除线上数据.所以须要从备份中找回数据恢复. 真实屋漏偏逢连夜雨.船迟又遇打头风.前两天备份的磁盘坏块,如今仅仅有rman全备的.bak文件,没有控制文件和參数文件,所 ...
- ICMP协议Ping命令的应用
ICMP的全称是 Internet Control Message Protocol ,它是TCP/IP协议族的一个子协议,属于网络层协议,用于在IP主机.路由器之间传递控制消息.从技术角度来讲,就是 ...