Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ Invalid argument on 'iptables' ]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Big Eye
n00b
n00b


Joined: 10 Sep 2003
Posts: 16

PostPosted: Tue Sep 23, 2003 1:38 am    Post subject: [ Invalid argument on 'iptables' ] Reply with quote

I am using Gentoo Linux with Kernel 2.4.20-r7 with iptables v.1.2.8, I tried to execute a command :

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

iptables: Invalid argument <---------- I got this.

========== quoted from 'lsmod' ==========
ipt_LOG 3384 4 (autoclean)
ipt_MASQUERADE 1336 0 (autoclean)
iptable_filter 1740 1 (autoclean)
iptable_mangle 2136 0 (autoclean) (unused)
========================================

I checked the folder '/lib/modules/2.4.20-gentoo-r7/kernel/net/ipv4/netfilter' and found these modules on my Gentoo

-rw-r--r-- 1 root root 3436 Sep 21 17:05 iptable_filter.o
-rw-r--r-- 1 root root 3780 Sep 21 17:05 iptable_mangle.o

When I checked the same path with my SuSE 8.0 and got :

-rw-r--r-- 1 root root 3256 Mar 27 2002 iptable_filter.o
-rw-r--r-- 1 root root 3660 Mar 27 2002 iptable_mangle.o
-rw-r--r-- 1 root root 22263 Mar 27 2002 iptable_nat.o

It seems a module 'iptable_nat.o' is missing on my Gentoo; and I did not compile the kernel for my SuSE box before -- the kernel and the modules are come from the original package.

For Gentoo box, I am sure the 'iptables' relative options already chosen before I compiled the Gentoo kernel.

I checked the 'How-To' and help for iptables and did not get any help.

Any help ?

Thanks

:cry:
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Tue Sep 23, 2003 2:21 am    Post subject: Reply with quote

re-emerge iptables
_________________
http://get.a.clue.de
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4975
Location: Gothenburg, Sweden

PostPosted: Tue Sep 23, 2003 8:18 am    Post subject: Reply with quote

Do you have CONFIG_IP_NF_NAT=m (Full NAT) set in your .config?
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.libera.chat
Back to top
View user's profile Send private message
Baldzius
Apprentice
Apprentice


Joined: 17 Mar 2003
Posts: 154
Location: Lithuania

PostPosted: Tue Sep 23, 2003 11:05 am    Post subject: Reply with quote

kallamej is right, but you should check everything under CONFIG_IP_NF_* as modules, as it 100% won't harm your system and you'll have everything { MATCHes, TARGETs } on demand.
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Mon Feb 09, 2004 5:39 pm    Post subject: Reply with quote

Moving from Networking and Security.

Please follow up to iptables invalid argument..

There are a great number of threads that are essentially dupes of this topic, so if you feel that something in this thread should go in the sticky thread, please re-post it there or provide a link back here. As always, please PM a moderator if you feel this thread is significantly different than any other thread and was inadvertently locked.

Thanks to nephros for pointing out the dupes.

nephros wrote:
These are a couple of dupes regarding the recent (and past) breakage of iptables with newer gentoo-sources (fix is to recompile iptables with correct "linux" symlink):

https://forums.gentoo.org/viewtopic.php?t=128430&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=123929&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=123385&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=121406&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=113410&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=101524&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=117746&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=110470&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=88111&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=79633&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=77221&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=74567&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=70546&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=52931&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=52020&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=47553&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=41032&highlight=iptables+invalid+argument
https://forums.gentoo.org/viewtopic.php?t=107331&highlight=iptables+invalid+argument

I am pretty sure there are even more. Oh when will they ever search... :roll:

_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum