Index: [Article Count Order] [Thread]

Date:  Tue, 15 Jan 2008 11:52:29 -0600
From:  "Gerald Waugh" <gwaugh (at mark) frontstreetnetworks.com>
Subject:  [coba-e:11730] Re: iptables NAT
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <01c701c8579f$695ba750$0101a8c0@systemax>
In-Reply-To:  <043f01c85792$5c6e8dd0$7800000a@pc11>
X-Mail-Count: 11730

Steffan wrote on Tuesday, January 15, 2008 10:19 AM
> im trying to connect port 2525 to port 25 on a RAQ running 
> Strongbolt with the line
> 
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2525 -j \
> REDIRECT --to-port 25
> 
> 
> but getting a error
> 
> iptables v1.2.11: can't initialize iptables table `nat': 
> Table does not exist (do you need to insmod?) Perhaps 
> iptables or your kernel needs to be upgraded.
> 
I ran the command as you wrote on a CBQ RaQ and it worked OK.
The RaQ used the Strongbolt Installer sb01.06-03.iso

What does 'lsmod' yield?

My lsmod before runing the cmd =
[root@localhost ~]# lsmod
Module                  Size  Used by
iptable_filter          1344  1
ip_tables               9720  1 iptable_filter
x_tables                6788  1 ip_tables

After running the command -
[root@localhost ~]# lsmod
Module                  Size  Used by
ipt_REDIRECT             928  1
xt_tcpudp               1984  1
iptable_nat             5668  1
ip_nat                 10636  2 ipt_REDIRECT,iptable_nat
ip_conntrack           30828  2 iptable_nat,ip_nat
iptable_filter          1344  1
ip_tables               9720  2 iptable_nat,iptable_filter
x_tables                6788  4
ipt_REDIRECT,xt_tcpudp,iptable_nat,ip_tables

I do have a RaQ built with an earlier version of the Strongbolt
installer that gave the same error, you experienced.

The CBQ-RaQ that works has;
[root (at mark) localhost ~]# locate iptable_nat.ko
/lib/modules/2.6.16i586/kernel/net/ipv4/netfilter/iptable_nat.ko
/lib/modules/2.6.9-55.0.9.EL/kernel/net/ipv4/netfilter/iptable_nat.ko

The CBQ-RaQ that doesn't work does have;
/lib/modules/2.6.9-55.0.9.EL/kernel/net/ipv4/netfilter/iptable_nat.ko
But does not have;
/lib/modules/2.6.16i586/kernel/net/ipv4/netfilter/iptable_nat.ko

So it may be you need the missing kernel module...

Gerald