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.

Share:
6,985

Related videos on Youtube

jini
Author by

jini

Updated on September 18, 2022

Comments

  • jini
    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
    poige about 12 years
    iptables v1.4.12.2: can't initialize iptables table `filter': Permission denied (you must be root)
  • Lucas Kauffman
    Lucas Kauffman about 12 years
    yea so run it as root...
  • Joel E Salas
    Joel E Salas about 12 years
    It's called "being an experienced sysadmin."
  • Lucas Kauffman
    Lucas Kauffman about 12 years
    I didn't, I ran the command as a regular user on one of my own machines and got the same output.
  • Magellan
    Magellan about 12 years
    Sounds 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
    poige about 12 years
    What a coincidence — I also did. In my case it clearly stated it needed root privileges.
  • poige
    poige about 12 years
    @Joel, Your adulation is counted
  • poige
    poige about 12 years
    @Adrian, what guess — blind or not? I'm just curios.
  • Magellan
    Magellan about 12 years
    Rebooting 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
    Magellan about 12 years
    This 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
    poige about 12 years
    @Adrian, let the OP decide. Have better ideas — fill it into the form below.