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的服务端口未开放. 首先还是还是输入以往的开启某 ...
随机推荐
- MySQL的一些基本操作
近期開始学习MySQL,主要是通过书籍,和看燕十八老师的视频,然后通过博客记录自己的学习过程. 登入数据库 zhiniaobu@telunsu-K55VD:~$ mysql -uroot -p Ent ...
- 修ecshop品牌筛选以LOGO图片形式显示
如何实现商品列表页属性筛选区品牌筛选以LOGO形式展示,最模板总结ecshop/'>ecshop教程入下: 1.修改 category.php 文件,将(大概215行) $sql = " ...
- python学习笔记之六:更加抽象
Python被称为面向对象的语言,创建自己的对象是python非常核心的概念.这里会介绍如何创建对象,以及多态,封装,方法,特性,超类以及继承的概念. 一. 对象的魔力 面向对象程序设计中的术语 对象 ...
- IOS开发-通知与消息机制
在多数移动应用中不论什么时候都仅仅能有一个应用程序处于活跃状态.假设其它应用此刻发生了一些用户感兴趣的那么通过通知机制就能够告诉用户此时发生的事情. iOS中通知机制又叫消息机制,其包含两类:一类是本 ...
- WEB打印的几种方案
-------------------------------------------一 基于Web的打印方案比较分析-------------------------------- 基于web的套 ...
- KMP求字符串最小循环节
证明1: 对于一个字符串S,长度为L,如果由长度为len的字符串s(字符串s的最小循环节是其本身)循环k次构成,那么字符串s就是字符串S的最小循环节 那么字符串有个很重要的性质和KMP挂钩,即 i ...
- GUI & Event例子
Student No.: _______________ Name: ________________________________________1TK2934 Object-Oriented P ...
- hadoop版本号变迁
近期在研究hadoop时,发现hadoop的版本号非常混乱.原来的版本号都说0.X.X開始,后来发现有1.X.X和2.X.X 这样就不太清楚了. 0.20.2版本号曾经(不含该版本号)的配置文件都在d ...
- java 对map排序
public static Map<String, String> sortMapByKey(Map<String, String> map) { if (map == nul ...
- lua 远程调试 【zeroBrane 使用mobdebug】(good转)
最近基于业务需求,学习了如何使用zeroBrane这个IDE实现C/S 模式下的 lua远程调试,废话不多,上效果图: ---------------------------------------- ...