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`
目录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--使用Snap安装第三方微信客户端Electronic-Wechat
前言 腾讯估计是不会给Linux系统开发任何软件了,不过问题不大。我们有很多好用的第三方软件替代~~(无奈之举,摊手)~~ 关于Snap Ubuntu官网上的介绍 Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single bu
2025-10-27 · 系统配置 · 约 1 分钟
Ubuntu-18-04-开启托盘图标点击最小化
前言 Ubuntu的托盘挺好看的,美中不足的就是点击一个打开的应用图标不能像Windows那样最小化。 操作 gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' 截图
2025-10-27 · 系统配置 · 约 1 分钟
在Linux系统上一键配置DoH,解决DNS解析被污染
DNS解析被污染?换DoH不就得了。云flare那破工具简单得可笑,国内DNS上游直接用就行。一行配置搞定,谁还不会啊?
2025-10-02 · 系统配置 · 约 1 分钟
小心误关了NAS服务器!修改Linux的电源键功能
NAS居然离线关机了?电源键被傻逼系统接管了。改改`logind.conf`让这玩意忽略电源键,省得误操作重启关机。谁用谁知道,别真当NAS是玩具。
2025-10-27 · 系统配置 · 约 1 分钟
讨论
共 0 条加载评论中…