Networking Forums

Networking Forums > Computer Networking > Linux Networking > NAT & iptables, contd.

Reply
Thread Tools Display Modes

NAT & iptables, contd.

 
 
Mickybadia
Guest
Posts: n/a

 
      01-24-2004, 03:48 PM
OK mates,

I recompiled my kernel with iptables/NAT features as modules. The headers I
have are the latest I can get by emerging (Gentoo). Modprobing works:
> # lsmod
> Module Size Used by Tainted: P
> ipt_MASQUERADE 1368 0 (autoclean)
> iptable_nat 17240 0 (autoclean) [ipt_MASQUERADE]
> ip_conntrack 18216 1 (autoclean) [ipt_MASQUERADE iptable_nat]
> ip_tables 12000 4 [ipt_MASQUERADE iptable_nat]
> floppy 50908 0 (autoclean)
> [etc.]


> # iptables -A POSTROUTING -t nat -o eth1 -j MASQUERADE
> iptables: Invalid argument


Whatever sens the following makes:
> # iptables -A POSTROUTING -t nat -j MASQUERADE
> iptables: Invalid argument


So I don't think the bad argument is eth1. As I get better error messages
when I change -A and -j, I suppose "-t nat" is the problem. Is there
anything to do first, to create the nat table or something.

By dropping arguments, I sometimes manage to get no message, but then
"iptables -L" gives me no changes.


I am sorry, but I really don't know what to do...



--
Mickybadia [http://mickybadia.free.fr/]

To reply, please remove "SAY_HELLO_TO_" from address.
Veuillez supprimer "SAY_HELLO_TO_" de l'adresse pour me répondre.

 
Reply With Quote
 
 
 
 
Brian
Guest
Posts: n/a

 
      01-24-2004, 04:26 PM
On Sat, 24 Jan 2004 17:48:31 +0100, Mickybadia wrote:

> OK mates,
>
> I recompiled my kernel with iptables/NAT features as modules. The headers I
> have are the latest I can get by emerging (Gentoo). Modprobing works:
>> # lsmod
>> Module Size Used by Tainted: P
>> ipt_MASQUERADE 1368 0 (autoclean)
>> iptable_nat 17240 0 (autoclean) [ipt_MASQUERADE]
>> ip_conntrack 18216 1 (autoclean) [ipt_MASQUERADE iptable_nat]
>> ip_tables 12000 4 [ipt_MASQUERADE iptable_nat]
>> floppy 50908 0 (autoclean)
>> [etc.]

>
>> # iptables -A POSTROUTING -t nat -o eth1 -j MASQUERADE
>> iptables: Invalid argument

>
> Whatever sens the following makes:
>> # iptables -A POSTROUTING -t nat -j MASQUERADE
>> iptables: Invalid argument

>
> So I don't think the bad argument is eth1. As I get better error messages
> when I change -A and -j, I suppose "-t nat" is the problem. Is there
> anything to do first, to create the nat table or something.
>
> By dropping arguments, I sometimes manage to get no message, but then
> "iptables -L" gives me no changes.
>
>
> I am sorry, but I really don't know what to do...


Instead of floundering about trying to guess what's going on by
dropping arguments and second-guessing the resulting error messages,
man iptables reveals the following:

The packet-filtering-HOWTO details iptables usage for packet
filtering, the NAT-HOWTO details NAT, the netfilter-extensions-HOWTO
details the extensions that are not in the standard distribution,
and the netfilter-hacking-HOWTO details the netfilter internals.
See http://www.netfilter.org/.

It could just be worth taking a look.

B.
--
All computers wait at the same speed.

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless Network Security Contd Redleg6 Windows Networking 2 08-19-2008 03:05 AM
iptables NAT and H.323 chris-usenet@roaima.co.uk Linux Networking 2 02-21-2005 02:16 PM
Looking for iptables applications code (iptables.c) to run some rules to forward packets tvnaidu@yahoo.com Linux Networking 2 01-17-2005 05:01 PM
iptables "can't initialize iptables table `filter'" pete Linux Networking 1 10-10-2003 03:44 AM
iptables sinapsi Linux Networking 1 09-28-2003 11:14 AM



1 2 3 4 5 6 7 8 9 10 11