Solve the problem of iptables: Firewall modules are not loaded

Use the following command to view the firewall today on the bricklayer 's server

[root@host src]# service iptables status
返回:iptables: Firewall modules are not loaded.

That is, the firewall module is not loaded
, so I found the following method on the Internet and solved it smoothly

加载ip_tables模块
[root@host src]# modprobe ip_tables
加载iptable_filter模块
[root@host src]# modprobe iptable_filter
在次查看
[root@host src]# lsmod | grep iptable
iptable_filter         16384  0
ip_tables              20480  1 iptable_filter
返回了信息,说明模块加载成功了
用之前的命令看看状态
[root@host src]# service iptables status
返回:
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

I also found another method, but it is useless, record it here

iptables -F #清理iptables规则
service iptables save #保存
service iptables restart #重启防火墙
service iptables status #查看状态

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325810883&siteId=291194637