Segmentation fault (core dumped) when try to run iptables rhel6

5,063

Check what CPU architecture you have on your system. You're likely mixing the 32-bit and 64-bit binaries and libraries together which is probably giving you this error message.

You can find out with this command:

# 64-bit system
$ getconf LONG_BIT
64

# 32-bit system
$ getconf LONG_BIT
32

If you have 32 then you should uninstall the 64-bit package of iptables. If you have 64-bit, then uninstall the 32-bit.

How to uninstall?

On the surface it would appear that the packages have the same name but I assure you they're different. You can get their actual names using this command:

$ rpm -aq iptables*
iptables-services-1.4.18-1.fc19.x86_64
iptables-1.4.18-1.fc19.x86_64
iptables-1.4.18-1.fc19.i686

So to get rid of the 32-bit version you can use this command:

$ yum remove iptables-1.4.18-1.fc19.i686

Obviously substitute your result in for the example above.

References

Share:
5,063

Related videos on Youtube

BlueFox
Author by

BlueFox

Currently doing my first year to an apprenticeship as an IT specialist

Updated on September 18, 2022

Comments

  • BlueFox
    BlueFox over 1 year

    I'm currently trying to set up a MySQL replication and I don't have a /etc/sysconfig/iptables. So I tried to install it with yum install. It showed the following output.

      Installed Packages
    Name        : iptables
    Arch        : x86_64
    Version     : 1.4.7
    Release     : 11.el6
    Size        : 836 k
    Repo        : installed
    From repo   : anaconda-RedHatEnterpriseLinux-201311111358.x86_64
    Summary     : Tools for managing Linux kernel packet filtering capabilities
    URL         : http://www.netfilter.org/
    License     : GPLv2
    Description : The iptables utility controls the network packet filtering code in
                : the Linux kernel. If you need to set up firewalls and/or IP
                : masquerading, you should install this package.
    
    Available Packages
    Name        : iptables
    Arch        : i686
    Version     : 1.4.7
    Release     : 11.el6
    Size        : 247 k
    Repo        : rhel-x86_64-server-6
    Summary     : Tools for managing Linux kernel packet filtering capabilities
    License     : GPLv2
    Description : The iptables utility controls the network packet filtering code in
                : the Linux kernel. If you need to set up firewalls and/or IP
                : masquerading, you should install this package.
    

    So far so good but when I try to run iptables I get a Segmentation fault

    Do I need a better hardware?

    [root@wltwd1 sysconfig]# iptables
    Segmentation fault (core dumped)
    

    This is my lscpu output:

    [root@wltwd1 sysconfig]# lscpu
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                1
    On-line CPU(s) list:   0
    Thread(s) per core:    1
    Core(s) per socket:    1
    Socket(s):             1
    NUMA node(s):          1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 47
    Stepping:              2
    CPU MHz:               1995.034
    BogoMIPS:              3990.06
    Hypervisor vendor:     VMware
    Virtualization type:   full
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              256K
    L3 cache:              18432K
    NUMA node0 CPU(s):     0
    
  • slm
    slm about 10 years
    @BlueFox - See update.