Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

iptables-restore: unable to initializetable ‘mangle’

linux, QuickFix, Technical | 0 comments

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

[root@server ~]# /etc/init.d/iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Applying iptables firewall rules: iptables-restore v1.2.11: iptables-restore: unable to initializetable ‘mangle’
Error occurred at line: 2
Try `iptables-restore -h’ or ‘iptables-restore –help’ for more information.
[FAILED]

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@server sysconfig]#iptables-save > /etc/sysconfig/iptables

Restarting iptables service:
[root@server sysconfig]# /etc/init.d/iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Applying iptables firewall rules: [ OK ]

You can see that the issue has been sorted out. It removed the unsupported rules from iptables list.

Related Articles

Related