From: Ira Abramov <lists-lartc@ira.abramov.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] same address range, different interfaces
Date: Thu, 20 Nov 2003 09:44:18 +0000 [thread overview]
Message-ID: <marc-lartc-106932196121024@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106924600531191@msgid-missing>
Quoting David Ruggles, from the post of Wed, 19 Nov:
> (Someone with more knowledge tell me if I'm wrong)
well, I'm no veteran either, but the man page said one can only do DNAT
in OUTPUT and PREROUTING while SNAT works only on POSTROUTING which is
the other way around from what I need...
> As far as I know the only way to modify packet addresses is to use the
> PREROUTING and POSTROUTING chains in the nat table.
>
> An example might be
>
> Machine A ip 10.0.0.2 ----> Gateway ip 10.0.0.1 eth0 <-> Gateway ip 10.0.0.3
> eth1 ----> Machine B ip 10.0.0.2
>
> On Gateway issue following:
>
> iptables -t nat -A PREROUTING -i eth0 -d 10.0.0.1 -j DNAT --to-destination
> 10.0.0.2
> iptables -t nat -A POSTROUTING -o eth1 -d 10.0.0.2 -j SNAT --to-source
> 10.0.0.1
>
> I'm not sure this will work though because how will the gateway know to send
> 10.0.0.2 out eth1 and not back out eth0?
my problem precisely...
--
A little something for the ladies
Ira Abramov
http://ira.abramov.org/email/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2003-11-20 9:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 12:38 [LARTC] same address range, different interfaces Ira Abramov
2003-11-19 15:44 ` Ira Abramov
2003-11-20 9:44 ` Ira Abramov [this message]
2003-11-20 15:32 ` Ira Abramov
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=marc-lartc-106932196121024@msgid-missing \
--to=lists-lartc@ira.abramov.org \
--cc=lartc@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.