From: Athan <netfilter@miggy.org>
To: netfilter@lists.netfilter.org
Subject: Re: port redirection *without* nat
Date: Mon, 6 Jan 2003 23:25:54 +0000 [thread overview]
Message-ID: <20030106232554.GL16581@miggy.org> (raw)
In-Reply-To: <20030106141753.A12922@infinity.rhythm.cx>
[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]
On Mon, Jan 06, 2003 at 02:17:53PM -0500, sm@rhythm.cx wrote:
> I'm trying to figure out how (if possible) to do port redirection with
> iptables on my linux router. This router is is not doing NAT, all connected
> networks have real, public IP addresses. There is tons of information out
> there about doing port redirection with NAT, but I can't find anything for
> without NAT. I just want to make the router take traffic destined for
> address A port x and change the destination address to send it off to
> address B port x instead. A and B are on the same (directly attached
> ethernet) network. I looked into the DNAT and REDIRECT targets, but those
> only seem to work in the nat table.
Um, think about it. You DO want 'NAT' of some sort for this.
Connection comes in from 1.2.3.4:1234 destined to A:x. You want this to
be handled by B:x. So you use a DNAT or REDIRECT to re-write the
destination, good, now have the connection ultimately ending up at B:x.
But as far as 1.2.3.4:1234 is concerned it IS talking to A:x, so the
return packets MUST be rewritten to come back from A:x, which is what
DNAT will do.
If you want B:x to completely handle the connection then you need the
clients to be just connecting to it directly in the first place, with
requisite INPUT/FORWARD rules setup to allow this.
-Ath
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
next prev parent reply other threads:[~2003-01-06 23:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-06 19:17 port redirection *without* nat sm
2003-01-06 23:25 ` Athan [this message]
2003-01-07 0:35 ` Joel Newkirk
-- strict thread matches above, loose matches on Subject: below --
2003-01-06 19:12 port redirection *without* NAT Steve Benson
2003-01-07 22:08 ` Athan
2003-01-07 22:36 ` sm
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=20030106232554.GL16581@miggy.org \
--to=netfilter@miggy.org \
--cc=netfilter@lists.netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox