Linux:Centos/防火墙:修订间差异
来自康健生活
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的1个中间版本) | |||
| 第2行: | 第2行: | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
service iptable status</syntaxhighlight>|$}} | service iptable status</syntaxhighlight>|$}} | ||
{{ | {| class="wikitable" | ||
|- | |||
| 临时关闭防火墙 || {{shc|<syntaxhighlight lang="bash"> | |||
service iptable stop</syntaxhighlight>|$}} | |||
|- | |||
| 永久关闭防火墙 || {{shc|<syntaxhighlight lang="bash"> | |||
service iptable off</syntaxhighlight>|$}} | |||
|} | |||
== CentOS 7.2 == | |||
CentOS 7.0默认使用的是firewall作为防火墙 | |||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
service | firewall-cmd --state</syntaxhighlight>|$}} | ||
{{shc|<syntaxhighlight lang="bash"> | |||
service | {| class="wikitable" | ||
|- | |||
| 停止 firewall || {{shc|<syntaxhighlight lang="bash"> | |||
systemctl stop 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
|
No categories