Linux:Centos/防火墙:修订间差异
来自康健生活
无编辑摘要 |
|||
| 第3行: | 第3行: | ||
service iptable status</syntaxhighlight>|$}} | service iptable status</syntaxhighlight>|$}} | ||
{ | {| 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>|$}} | ||
{ | {| 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>|$}} | |||
|} | |||