Friday, January 15, 2016

iptables-restore : iptables-restore: unable to initialize table 'mangle'




iptables-restore: unable to initializetable ‘mangle’



If you’re getting the following error on your server, iptables update might have caused this issue.
 
=====================


[root@mon ~]# /etc/init.d/iptables start
iptables: Applying firewall rules: FATAL: Module ip_tables not found.
iptables-restore v1.4.7: iptables-restore: unable to initialize table 'mangle'

Error occurred at line: 2
Try `iptables-restore -h' or 'iptables-restore --help' for more information.

====================



To resolve this, check the output of iptables -L if that gives any output, save it using following command and then restart iptables as shown below.
Saving iptables rules:

[root@mon ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

[root@mon ~]# iptables-save > /etc/sysconfig/iptables

[root@mon ~]#  /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

 



The issue has been sorted out. It removed the unsupported rules from iptables list.

2 comments:

  1. Successful bloggers often become influencers Virtualization Energy Utilities shaping trends, consumer choices, and public opinion with their content and recommendations.

    ReplyDelete