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 许可协议。转载请注明出处!
相关文章
配置MariaDB数据库服务端远程访问
操作步骤 开启远程访问权限 连接MariaDB数据库,执行以下命令开启远程访问。 grant all privileges on *.* to 'root'@'192.168.248.248' identified by 'password'; flush privileges; 如果需要任意IP地址访问,就把IP地址换成%。 修改配置文件 在网络上能搜索到的资料都只说了第一点,然而亲测之后并没有
2025-10-27 · 系统配置 · 约 1 分钟
Linux设置系统邮件转发到指定邮箱
前言 在Linux的操作中,有的时候每敲一下回车,就出来You have new mail in /var/spool/mail/root的提示,究竟是为什么呢? Linux 系统经常会自动发出一些邮件来提醒用户系统中出了哪些问题(收件箱位置:/var/mail/)。可是这些邮件都是发送给 root 用户的。出于系统安全考虑,通常不建议大家直接使用 root 帐户进行日常操作。所以要想点办法来让系
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 分钟
在Manjaro上配置国内源
前言 之前我一直用官方源的,但是最近发现官方源变慢了,于是想要切换国内源,顺手做个笔记。 操作 使用以下命令,生成可用中国镜像站列表: sudo pacman-mirrors -i -c China -m rank 刷新完列表之后会弹出来一个框让你选择软件源,这里的就都是国内源了,选择一个喜欢的就行(当然要选择两个以上也没问题。) 日常桌面截图
2025-10-27 · 系统配置 · 约 1 分钟
讨论
共 0 条加载评论中…