Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
IPTABLES: error doing masquerading command
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
schorsch79
n00b
n00b


Joined: 05 Jun 2003
Posts: 27

PostPosted: Sun Aug 31, 2003 3:36 pm    Post subject: IPTABLES: error doing masquerading command Reply with quote

hi there!
i installed a gentoo 1.4 box with a internet connection over pptp. the internet connection is working, i get a ip address assigned on ppp0, i can ping extern hosts from the routing machine, but when i try to set up masquerading with:
Code:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

it gives me an error message saying:
Code:
iptables: Invalid argument

there are a lot of iptables modules loaded and i've compiled the kernel with netfilter settings activated.

who can help me with this problem?
tnx!
Back to top
View user's profile Send private message
ragger
n00b
n00b


Joined: 10 Feb 2003
Posts: 21

PostPosted: Sun Aug 31, 2003 4:15 pm    Post subject: Reply with quote

i had the same error a while ago after i upgraded the kernel.. fixed it by re-emerging iptables.
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sun Aug 31, 2003 4:29 pm    Post subject: Reply with quote

Is module ipt_MASQUERADE loaded?
Back to top
View user's profile Send private message
schorsch79
n00b
n00b


Joined: 05 Jun 2003
Posts: 27

PostPosted: Sun Aug 31, 2003 4:39 pm    Post subject: Reply with quote

yes, modules ipt_MASQUERADE is loaded.
I'll try to re-emerge iptables as ragger proposed, hoping, that it works! I'm using the gentoo reference platform, maybe my iptables is outdated (version 1.2.8)?
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sun Aug 31, 2003 4:44 pm    Post subject: Reply with quote

If that didn't help, here's another question: is module iptable_nat loaded? In my box using masquerade/NAT I have these modules loaded:

---
Module Size Used by Not tainted
ipt_MASQUERADE 2296 1 (autoclean)
iptable_nat 21656 1 (autoclean) [ipt_MASQUERADE]
ip_conntrack 29632 1 (autoclean) [ipt_MASQUERADE iptable_nat]
iptable_filter 2412 0 (autoclean) (unused)
ip_tables 15992 5 [ipt_MASQUERADE iptable_nat iptable_filter]
---
Back to top
View user's profile Send private message
schorsch79
n00b
n00b


Joined: 05 Jun 2003
Posts: 27

PostPosted: Sun Aug 31, 2003 5:25 pm    Post subject: Reply with quote

ok, janne, i'm back with lynx now... so it takes some time. all the modules you specified, are loaded. i'm now emerging iptables. maybe this will fix the issue. i uses 1.2.8-rc1 and now there is 1.2.8, so let's hope that this changes things. otherwise i have no more ideas what to check.
Back to top
View user's profile Send private message
wunderk1nd
n00b
n00b


Joined: 18 Mar 2003
Posts: 10

PostPosted: Sun Aug 31, 2003 5:39 pm    Post subject: don't use binaries.. Reply with quote

I had the same problem with iptables installed from binary..

re-emerge from source
Back to top
View user's profile Send private message
schorsch79
n00b
n00b


Joined: 05 Jun 2003
Posts: 27

PostPosted: Sun Aug 31, 2003 5:43 pm    Post subject: Reply with quote

solved!! reemerge iptables and it worked! thank you guys!
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Raleigh, NC

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):

http://forums.gentoo.org/viewtopic.php?t=128430&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=123929&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=123385&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=121406&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=113410&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=101524&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=117746&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=110470&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=88111&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=79633&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=77221&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=74567&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=70546&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=52931&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=52020&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=47553&highlight=iptables+invalid+argument
http://forums.gentoo.org/viewtopic.php?t=41032&highlight=iptables+invalid+argument
http://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