Centos7.5 防火墙设置
Centos7.5默认使用firewalld作为防火墙
1.查看firewalld服务状态
systemctl status firewalld
2.查看firewalld的状态
firewall-cmd --state
3.开启、重启、关闭firewalld服务
# 开启
service firewalld start
# 重启
service firewalld restart
# 关闭
service firewalld stop
4.查看防火墙规则
firewall-cmd --list-all
5.查询、开放、移除端口
# 查询端口是否开放
firewall-cmd --query-port=8080/tcp
# 开放80端口
firewall-cmd --permanent --add-port=80/tcp
# 移除端口
firewall-cmd --permanent --remove-port=8080/tcp #重启防火墙(修改配置后要重启防火墙)
firewall-cmd --reload # 参数解释
1、firwall-cmd:是Linux提供的操作firewall的一个工具;
2、--permanent:表示设置为持久;
3、--add-port:标识添加的端口;
⒍一些补充
# 关闭防火墙
systemctl stop firewalld #禁用防火墙自启
systemctl disable firewalld #安装iptables-service管理工具
yum -y install iptables-services #启动iptables
systemctl start iptables #设置为开机自启
systemctl enable iptables #清空iptables规则
iptables -F #保存到iptables默认规则
service iptables save
Centos7.5 防火墙设置的更多相关文章
- centos7.3 防火墙设置
1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewall ...
- centos7.4 防火墙设置
1.关闭默认的firewall防火墙 systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service ...
- Centos7关闭防火墙 设置开机启动
[root@nmserver-7 ~]# systemctl stop firewalld.service [root@nmserver-7 ~]# systemctl status firewall ...
- centos7开放端口和防火墙设置
centos7开放端口和防火墙设置. 查看防火墙状态: firewall-cmd --state 如果显示: not running 打开防火墙服务: systemctl start firewall ...
- CentOS7防火墙设置常用命令
目录 开/关/重启防火墙 查看所有开启的端口号 CentOS7环境下防火墙常用命令 开/关/重启防火墙 查看防火墙状态 firewall-cmd --state 启动防火墙 systemctl sta ...
- centos7 tengine2.1.2 编译安装 防火墙设置
安装 pcre 和 openssl yum -y install pcre pcre-devel yum -y install openssl openssl-devel wget http://te ...
- Centos7开启防火墙并且使MYSQL外网访问开放3306端口
http://www.cnblogs.com/kreo/p/4368811.html CentOS7默认防火墙是firewalle,不是iptables #先检查是否安装了iptables servi ...
- Skynet服务器框架(十) CentOS 防火墙设置
引言: 今天修改了 skynet 服务器的 IP 地址(即 config 文件中的 address 和 master 两项参数,IP 与当前及其的保持一致,端口号为 2017),然后使用一个简单的客户 ...
- centos7的防火墙(firewalld)
Centos7中默认将原来的防火墙iptables升级为了firewalld,firewalld跟iptables比起来至少有两大好处: 1.firewalld可以动态修改单条规则,而不需要像ipta ...
随机推荐
- 【BZOJ2425】[HAOI2010]计数(组合数学)
[BZOJ2425][HAOI2010]计数(组合数学) 题面 BZOJ 洛谷 题解 很容易的一道题目. 统计一下每个数位出现的次数,然后从前往后依次枚举每一位,表示前面都已经卡在了范围内,从这一位开 ...
- 批量导入导出站点权限site permissions
批量导入站点权限 cls $Web = Get-SPWeb "http://16.178.115.14:91/" Get-Content c:\export\account.t ...
- DataFrame 数据去重
df.head() >>> Price Seqno Symbol time 0 1623.0 0.0 APPL 1473411962 1 1623.0 0.0 APPL 147341 ...
- ormlite 文档
目录[-] A Fast, Simple, Typed ORM for .NET Download 8 flavours of OrmLite is on NuGet: Docs and Downlo ...
- [FJOI2017]矩阵填数——容斥
参考:题解 P3813 [[FJOI2017]矩阵填数] 题目大意: 给定一个 h∗w 的矩阵,矩阵的行编号从上到下依次为 1...h ,列编号从左到右依次 1...w . 在这个矩阵中你需要在每个格 ...
- (转)Java中equals和==、hashcode的区别
背景:学习辉哥总结的基础知识,从头来,直面短板. 1 问题引入及分析 请看下面的代码清单1 @Test public void test01() { String a = "a" ...
- windows 2003 IIS FTP 530 home directory inaccessible
在 Windows Server 2003 及更新的版本中,IIS 中的 FTP 可以使用用户隔离了. 隔离有什么好处呢? 看起来更高级.比如 ftp1 用户打开的时候看到的路径是 /,但内容是自己文 ...
- 转:@ControllerAdvice + @ExceptionHandler 全局处理 Controller 层异常
继承 ResponseEntityExceptionHandler 类来实现针对 Rest 接口 的全局异常捕获,并且可以返回自定义格式: 复制代码 1 @Slf4j 2 @ControllerAdv ...
- springcloud的配置文件的读取顺序
SpringBoot默认支持properties和YAML两种格式的配置文件.前者格式简单,但是只支持键值对.如果需要表达列表,最好使用YAML格式.SpringBoot支持自动加载约定名称的配置文件 ...
- 实现在某一指定位置的div在窗口滚动到指定位置的时候fixed定位
HTML: <div class="top"> ·····内容 </div> <div class="scroll">< ...