Linux:Centos/防火墙:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
无编辑摘要
 
第3行: 第3行:
service iptable status</syntaxhighlight>|$}}
service iptable status</syntaxhighlight>|$}}


{{leftrightflex|临时关闭防火墙
{| class="wikitable"
{{shc|<syntaxhighlight lang="bash">
|-
service iptable stop</syntaxhighlight>|$}}|永久关闭防火墙
| 临时关闭防火墙 || {{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
service iptable stop</syntaxhighlight>|$}}
service iptable off</syntaxhighlight>|$}}}}
|-
| 永久关闭防火墙 || {{shc|<syntaxhighlight lang="bash">
service iptable off</syntaxhighlight>|$}}
|}
 
== CentOS 7.2 ==
== CentOS 7.2 ==
CentOS 7.0默认使用的是firewall作为防火墙
CentOS 7.0默认使用的是firewall作为防火墙
第13行: 第17行:
firewall-cmd --state</syntaxhighlight>|$}}
firewall-cmd --state</syntaxhighlight>|$}}


{{leftrightflex|停止 firewall
{| class="wikitable"
{{shc|<syntaxhighlight lang="bash">
|-
systemctl stop firewalld.service</syntaxhighlight>|$}}|禁止 firewall 开机启动
| 停止 firewall || {{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
systemctl stop firewalld.service</syntaxhighlight>|$}}
systemctl disable firewalld.service</syntaxhighlight>|$}}}}
|-
| 禁止 firewall 开机启动 || {{shc|<syntaxhighlight lang="bash">
systemctl disable firewalld.service</syntaxhighlight>|$}}
|}

2020年3月26日 (四) 07:47的最新版本

CentOS 6.5

 
service iptable status
临时关闭防火墙
 
service iptable stop
永久关闭防火墙
 
service iptable off

CentOS 7.2

CentOS 7.0默认使用的是firewall作为防火墙

 
firewall-cmd --state
停止 firewall
 
systemctl stop firewalld.service
禁止 firewall 开机启动
 
systemctl disable firewalld.service