All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert van der Ploeg <netfilter@geert.triple-it.nl>
To: "Ing. Rogelio Sevilla Fernandez" <sevilla@col.gob.mx>
Cc: netfilter@lists.netfilter.org
Subject: Re: Problems With MASQ/ Kernel 2.4.29
Date: Sat, 12 Mar 2005 01:23:17 +0100	[thread overview]
Message-ID: <42323675.8090007@geert.triple-it.nl> (raw)
In-Reply-To: <20050311180127.rcp5r70mjo0c4c4c@mail.col.gob.mx>

Ing. Rogelio Sevilla Fernandez wrote:
> I recently compiled kernel 2.4.29 with all netfilter options as modules.
> 
> All start ok, but when i set the MASQUERADE jump target on POSTROUTING
> i got:
> iptables -t nat -I PREROUTING -o eth0 -j MASQUERADE
> iptables: target problems.

when using PREROUTING rules, you should specify the incoming interface,
not the outgoing.
Or, said the other way around: when using an outgoing interface, you
should specify POSTROUTING rules.

So, because you try to masquerade, what you really want is:
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

See section 5 in the NAT-howto for iptables.


Hope this helps.


Regards,

Geert van der Ploeg



  reply	other threads:[~2005-03-12  0:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12  0:01 Problems With MASQ/ Kernel 2.4.29 Ing. Rogelio Sevilla Fernandez
2005-03-12  0:23 ` Geert van der Ploeg [this message]
     [not found] ` <42323616.7010900@triple-it.nl>
2005-03-12  0:25   ` Ing. Rogelio Sevilla Fernandez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42323675.8090007@geert.triple-it.nl \
    --to=netfilter@geert.triple-it.nl \
    --cc=netfilter@lists.netfilter.org \
    --cc=sevilla@col.gob.mx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.