Centos7下开启防火墙,允许通过的端口
1、查看防火墙状态
systemctl status firewalld

2、如果不是显示active状态,需要打开防火墙
systemctl start firewalld
3、# 查看所有已开放的临时端口(默认为空)
# firewall-cmd --list-ports
4、 查看所有永久开放的端口(默认为空)
# firewall-cmd --list-ports --permanent
5、添加临时开放端口(例如:比如我修改ssh远程连接端口是223,则需要开放这个端口)
# firewall-cmd --add-port=223/tcp
6、 添加永久开放的端口(例如:223端口)
# firewall-cmd --add-port=223/tcp --permanent
7、关闭临时端口
# firewall-cmd --remove-port=223/tcp
8、关闭永久端口
# firewall-cmd --remove-port=223/tcp --permanent
9、 配置结束后需要输入重载命令并重启防火墙以生效配置
# firewall-cmd --reload
# systemctl restart firewalld
Centos7下开启防火墙,允许通过的端口的更多相关文章
- CentOS7下Firewall防火墙配置用法详解
官方文档地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide ...
- linux下开启防火墙,打开端口
service iptables start时提示:“iptables: No config file. [WARNING]” 此时打 ...
- centos7篇---开启防火墙和特定端口
开启防火墙服务 以前为了方便,把防火墙都关闭了,因为现在项目都比较重要,害怕受到攻击,所以为了安全性,现在需要将防火墙开启,接下来介绍一下步骤.1, 首先查看防火墙状态: firewall-cmd - ...
- Centos7 下的防火墙端口配置
如果外部不能访问,需要查看防火墙以及服务器的端口安全设置. 防火墙的操作 查看所有打开的端口: firewall-cmd --zone=public --list-ports 添加 firewall- ...
- CentOS7关闭/开启防火墙出现 Unit iptables.service failed to load
在vm中安装好tomcat,而且在liunx中使用nc命令可以返回成功,但是更换到window中访问不到tomcat的情况,是由于linux防火墙的问题造成的,传统的解决方式有2中 第一种解决方案: ...
- centos7下的防火墙
在cengos7下的防火墙是交给systemctl来管理服务和程序,包括了service和chkconfig. 查看firewalld.service 是否启动 systemctl stop fire ...
- CentOS7下配置防火墙放过Keepalived
Keepalived是一个轻量级的HA集群解决方案,但开启防火墙后各节点无法感知其它节点的状态,各自都绑定了虚拟IP.网上很多文章讲要配置防火墙放过tcp/112,在CentOS7下是无效的,正确的做 ...
- centos7下操作防火墙
引言 最近使用centos7系统比较频繁,在配置服务器的时候,总是遇到能够ping通服务器,但是就是没有办法访问80端口,这个时候我的直觉告诉我,肯定是防火墙的原因,但是使用iptables却怎么都找 ...
- centos7下 开启/关闭/查看firewall运行状态命令
1.开启防火墙:systemctl start firewalld.service [root@localhost bin]# systemctl start firewalld.service [r ...
随机推荐
- Failed to connect to raw.githubusercontent.com 443 解决方案
wget 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid ...
- SQLMAP配置洋葱路由
[笔者目前使用的系统是kali渗透系统] =================================================================== 首先下载tor apt ...
- kubernetes之数据管理
volume emptyDir [machangwei@mcwk8s-master ~]$ kubectl apply -f mcwVolume1.yml #部署emptydir pod/produc ...
- 手写一个Java程序输出HelloWorld
` 创建一个Hello.java文件使用记事本打开 public class Hello{ public static void main(String [] args){ System.out.pr ...
- swagger 2.0
1.引入jar包 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox- ...
- Ansible部署K8s集群
目录 检查网络:k8s-check.yaml 连接配置:k8s-conn-cfg.yaml 配置k8s集群dns解析: k8s-hosts-cfg.yaml 配置yum源:k8s-yum-cfg.ya ...
- bash初始化文件详解
目录 交互式(interactive)shell/非交互式(non-interactive)shell 如何启动一个交互式shell/非交互式shell 如何判断是否为交互式shell 登录式(log ...
- git子模块的使用
1. 在项目中添加子模块 命令: git submodule add <url> 例子: git submodule add https://github.com/chaconinc/Db ...
- 【C# .Net GC】Windows 系统上的大型对象堆
原文链接:https://docs.microsoft.com/zh-cn/dotnet/standard/garbage-collection/large-object-heap NET 垃圾回收器 ...
- Python 的垃圾回收
垃圾回收 首先介绍两个画图的工具:objgraph 包和在线绘图网站 draw.io.具体的使用以后再写. 1.引用计数 Python 中,每个对象都有存有指向该对象的引用总数,即:引用计数(refe ...