Why is iptables command throwing errors?
6,985
Solution 1
@poige is right, your loading the wrong kernel module version. I added as a seperate answer since there wasnt really enough room in comments.
In libkmod/libkmod-index.h
/* Integers are stored as 32 bit unsigned in "network" order, i.e. MSB first.
All files start with a magic number.
Magic spells "BOOTFAST". Second one used on newer versioned binary files.
*/
/* #define INDEX_MAGIC_OLD 0xB007FA57 */
#define INDEX_MAGIC 0xB007F457
Solution 2
You are running it as a regular user, run the command as root.
Solution 3
Have you tried rebooting? Seems like module version is newer than running kernel expects.
Related videos on Youtube
Author by
jini
Updated on September 18, 2022Comments
-
jini over 1 year
I typed the following on my Debian system:
iptables --list
And got the following:
libkmod: ERROR ../libkmod/libkmod-index.c:816 index_mm_open: magic check fail: b007fa57 instead of b007f457 iptables v1.4.13: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
Any tips on how to fix it?
-
poige about 12 yearsiptables v1.4.12.2: can't initialize iptables table `filter': Permission denied (you must be root)
-
Lucas Kauffman about 12 yearsyea so run it as root...
-
Joel E Salas about 12 yearsIt's called "being an experienced sysadmin."
-
Lucas Kauffman about 12 yearsI didn't, I ran the command as a regular user on one of my own machines and got the same output.
-
Magellan about 12 yearsSounds like a guess to me. Some troubleshooting suggestions to verify whether or not this is the case would be more beneficial to future readers of this question.
-
poige about 12 yearsWhat a coincidence — I also did. In my case it clearly stated it needed root privileges.
-
poige about 12 years@Joel, Your adulation is counted
-
poige about 12 years@Adrian, what guess — blind or not? I'm just curios.
-
Magellan about 12 yearsRebooting is not a solution. It may (or may not) address a particular symptom of an underlying problem, but it certainly does nothing to prevent future occurrences by the OP or anyone else who happens across this post on a search engine.
-
Magellan about 12 yearsThis is a far better example of how answers should be posted. Meaningful information provided so that future readers can compare their installation to the reported problem and suggested resolution.
-
poige about 12 years@Adrian, let the OP decide. Have better ideas — fill it into the form below.