将 CentOS 7 中的 firewalld 换回 iptables

惯例是一段废话


前几天开始把各服务器从 Ubuntu 迁移到了 CentOS,然而在配置 iptables 的时候发现表好像不太对劲,Google 后得知原来 CentOS 7 中默认的防火墙从 iptables 换成了 firewalld,然而懒人如我 = = 所以还是先换回 iptables 以当权宜之计

Reverting to the iptables Service


If you are not ready to make the break to firewalld, you can still use the iptables service by issuing the following commands.

systemctl stop firewalld
systemctl disable firewalld

yum install iptables-services

iptables-service

touch /etc/sysconfig/iptables
systemctl start iptables
systemctl enable iptables

touch /etc/sysconfig/ip6tables
systemctl start ip6tables
systemctl enable ip6table

发布者

Lawrence

不过一介御用闲人

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理