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