All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>
To: netfilter@vger.kernel.org
Cc: Kevin Bailey <ke-linux@retriever.dyndns.org>
Subject: Re: Pre-routing re-write
Date: Fri, 16 Oct 2009 13:13:30 +0200	[thread overview]
Message-ID: <4AD8555A.1080301@unipex.it> (raw)
In-Reply-To: <20091014231016.GA4580@retriever.dyndns.org>

Kevin Bailey ha scritto:
> I'm trying to get a re-write rule to occur after routing has occured.
>  My host has the address 192.168.10.1 and a gateway of 192.168.10.2 
> to 192.168.11.0/24.
> 

Sorry, but this can be possible. The gw for a network class must be
inside the _same_ class!

> The re-write rule I have is:
> 
> # Map 11 net to 10 net iptables -t nat -A OUTPUT -d 192.168.11.0/24 
> -j NETMAP --to 192.168.10.0/24
> 
> It does the re-write but, as far as I can tell, isn't using the 
> default gateway to 192.168.11.0/24.
> 
> I assume a POSTROUTING rule might do this, but when I use the 
> POSTROUTING queue, it doesn't do the translation. Using mangle or 
> DNAT produce an error, not surprisingly.
> 
> Is there any way to do this ?


Where the packet starts? If you use nat + output you are saying to the
kernel to do a thing when a packet are generated locally.
Are you the gateway for another network (lan)?
However, It's not so well explained what you want to achieve.

Michele

  reply	other threads:[~2009-10-16 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 23:10 Pre-routing re-write Kevin Bailey
2009-10-16 11:13 ` Michele Petrazzo - Unipex [this message]
2009-10-17  3:43   ` Kevin Bailey
2009-10-23 13:35     ` Michele Petrazzo - Unipex

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=4AD8555A.1080301@unipex.it \
    --to=michele.petrazzo@unipex.it \
    --cc=ke-linux@retriever.dyndns.org \
    --cc=netfilter@vger.kernel.org \
    /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.