2

Due to a bug (similar to this one) i'm facing with iptables in Centos 7, I'd like to update the version of iptables.

# yum update iptables
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirror.de.leaseweb.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
No packages marked for update
# iptables -V
iptables v1.4.21

So I figured I'd update to either the latest (from their git) or to the tagged 1.6.0.

I managed to add the libraries needed to get ./autogen.sh to run, then managed to ./configure --disable-nftables and make and make install.

Now i'm not sure how I can run this version to test it, and how to implement it if it works as the default iptables.

ericosg
  • 120

3 Answers3

1

How about direct install

yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/iptables-1.4.21-33.el7.x86_64.rpm

Ref: https://pkgs.org/search/?q=iptables

0

I've found an online article that was spot on.

If this helps anyone, the steps I took before this article were the following:

git clone git://git.netfilter.org/iptables.git
cd iptables
sudo yum install kernel-devel autoconf automake libtool

Then the online article I followed does:

./configure --prefix=/usr      \
            --sbindir=/sbin    \
            --disable-nftables \
            --enable-libipq    \
            --with-xtlibdir=/lib/xtables &&
make

sudo su

make install &&
ln -sfv ../../sbin/xtables-multi /usr/bin/iptables-xml &&

for file in ip4tc ip6tc ipq iptc xtables
do
  mv -v /usr/lib/lib${file}.so.* /lib &&
  ln -sfv ../../lib/$(readlink /usr/lib/lib${file}.so) /usr/lib/lib${file}.so
done
ericosg
  • 120
0

Git source don't have configure script in it, better download sources from iptables website

wget http://www.netfilter.org/projects/iptables/files/iptables-1.8.3.tar.bz2
tar -xvf iptables-1.8.3.tar.bz2
cd iptables-1.8.3

then follow this instructions http://www.linuxfromscratch.org/blfs/view/svn/postlfs/iptables.html