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 许可协议。转载请注明出处!
相关文章
Ubuntu-18-04-开启托盘图标点击最小化
前言 Ubuntu的托盘挺好看的,美中不足的就是点击一个打开的应用图标不能像Windows那样最小化。 操作 gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' 截图
2025-10-27 · 系统配置 · 约 1 分钟
给你的Deepin系统换主题~
我现在的桌面: 因为美国封锁然后华为电脑用上Deepin系统的事情,Deepin系统最近名声大噪,其实Deepin本来的界面就很好看,号称打造最适合国人的系统不是盖的。 不过Deepin有一个坏处,就是默认主题的标题栏太大了…… 太占空间。所以我们要换主题折腾一下。 Deepin的桌面是Qt写的,所以首先要换KDE主题,然后再安排一下GTK3的主题,在Deepin系统设置里面换的主题就是GTK的,
2025-10-01 · 系统配置 · 约 1 分钟
小心误关了NAS服务器!修改Linux的电源键功能
NAS居然离线关机了?电源键被傻逼系统接管了。改改`logind.conf`让这玩意忽略电源键,省得误操作重启关机。谁用谁知道,别真当NAS是玩具。
2025-10-27 · 系统配置 · 约 1 分钟
Linux安装zsh并使用oh-my-zsh配置
安装zsh sudo apt install zsh 配置 oh my zsh curl sh -c $(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh) wget sh -c $(wget https://raw.github.com/robbyrussell/oh-my-zsh/m
2025-10-27 · 系统配置 · 约 1 分钟
讨论
共 0 条加载评论中…