返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
系统配置

Disable the CentOS-6 firewall, disable the Linux system firewall.

Preface Recently, while deploying a service, I needed to temporarily disable the firewall. So I'm noting down how to disable the CentOS firewall. Check System Version Enter: `cat /etc/issue` to check the version. Disable via the service Command The `service` command to start and stop the firewall takes effect immediately, and it will automatically revert upon the next system restart. Check Firewall Status: `service iptables status` Remember, in CentOS 6.9, you enter `iptables`. Some online tutorials use `serv`

曦远 (DealiAxy)约 4 分钟
目录6 个章节

Foreword

When deploying a service recently, I needed to temporarily disable the firewall. Therefore, I'm making a note on how to disable the CentOS firewall.

Check System Version

Input: cat /etc/issue to check the version

Disabling via Service

Using service commands to enable or disable the firewall takes effect immediately and will automatically revert upon the next system reboot.

Check the firewall status:

service iptables status

Remember that in CentOS 6.9, you need to input iptables. Some online tutorials use the service iptable status command, which does not work.

Disable the firewall: service iptables stop
Enable the firewall: service iptables start

Operations via /etc/init.d/iptables

View firewall status: /etc/init.d/iptables/status

Disable the firewall: /etc/init.d/iptables stop (This is a temporary shutdown that only stops the currently running firewall. After a reboot, the firewall will start again because it is configured to auto-start at boot.)

Disable Firewall Boot Autostart Using the chkconfig Command

Permanently enable the firewall: chkconfig iptables on

Check status: chkconfig --list iptables

Permanently disable the firewall: chkconfig iptables off

About


Follow my WeChat Official Account for more interesting operations: DealiAxy
All articles are also on my blog: blog.deali.cn

_EOF_

Disable the CentOS-6 firewall, disable the Linux system firewall.

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

Linux设置系统邮件转发到指定邮箱

前言 在Linux的操作中,有的时候每敲一下回车,就出来You have new mail in /var/spool/mail/root的提示,究竟是为什么呢? Linux 系统经常会自动发出一些邮件来提醒用户系统中出了哪些问题(收件箱位置:/var/mail/)。可是这些邮件都是发送给 root 用户的。出于系统安全考虑,通常不建议大家直接使用 root 帐户进行日常操作。所以要想点办法来让系

2025-10-27 · 系统配置 · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…