centos7 防火墙

简介:

CentOS 7.0默认使用的是firewall作为防火墙,使用iptables需要安装相关包

关闭防火墙

1
2
systemctl stop firewalld.service  #停止firewall
systemctl disable firewalld.service  #禁止firewall开机启动


使用iptables

1
2
3
4
5
6
7
yum -y  install  iptables iptables-services
  
systemctl start iptables.service  #启动防火墙
systemctl stop iptables.service  #关闭防火墙
systemctl  enable  iptables.service  #设置防火墙开机启动
systemctl disable iptables.service  #禁止防火墙开机启动
service iptables save   #保存防火墙规则






      本文转自无形于有形  51CTO博客,原文链接:http://blog.51cto.com/jinchuang/1947056,如需转载请自行联系原作者

相关文章
|
1月前
|
Linux 网络安全
Centos 防火墙端口控制命令
Centos 防火墙端口控制命令
42 3
|
1月前
|
网络协议 安全 Linux
linux配置防火墙 Centos7下 添加 端口白名单
linux配置防火墙 Centos7下 添加 端口白名单
87 0
|
6天前
|
网络协议 Linux 网络安全
CentOS 7 防火墙指令
本文介绍了CentOS 7中管理防火墙`firewalld`的指令。
14 0
|
17天前
|
XML 安全 Linux
【Linux】深入探究CentOS防火墙(Firewalld):基础概念、常用命令及实例操作
【Linux】深入探究CentOS防火墙(Firewalld):基础概念、常用命令及实例操作
|
22天前
|
网络协议 Linux 网络安全
Linux(17)Centos5、6、7、8版本的防火墙常用命令
Linux(17)Centos5、6、7、8版本的防火墙常用命令
25 0
|
29天前
|
Linux 网络安全
centos7如何关闭防火墙
centos7如何关闭防火墙
25 3
|
1月前
|
网络协议 Linux 网络安全
Centos7 防火墙策略rich-rule 限制ip访问-----图文详解
Centos7 防火墙策略rich-rule 限制ip访问-----图文详解
44 0
|
5月前
|
运维 网络协议 安全
小白带你学习linux的防火墙
小白带你学习linux的防火墙
152 1
|
7月前
|
安全 Linux 网络安全
Linux一些防火墙实战知识
本文介绍了如何在Linux中设置防火墙和开放端口,以提高服务器的安全性。首先,使用firewalld作为防火墙软件包,并确保firewalld服务正在运行。然后,通过添加服务来定义允许的服务端口,可以使用firewall-cmd命令查看当前已定义的服务,并使用firewall-cmd命令添加服务。添加规则后,需要重新加载firewalld配置以使更改生效。在某些情况下,需要打开特定的端口,例如HTTP端口80和HTTPS端口443。可以使用firewall-cmd命令打开端口,并将规则添加到相应的区域。。。确实都是工作中日常中会用到的一些命令
|
2月前
|
存储 安全 网络协议
使用 firewall-cmd 管理 Linux 防火墙端口
本文将介绍如何使用 firewall-cmd 工具在 Linux 系统中进行简单端口管理,包括开放、查询、关闭等操作。通过实例展示相关命令的用法,希望能对大家有所帮助。
153 0

热门文章

最新文章