From: "Taylor, Grant" <gtaylor@riverviewtech.net>
To: Jose Maria Lopez Hernandez <jkerouac@bgsec.com>
Cc: "netfilter@lists.netfilter.org" <netfilter@lists.netfilter.org>
Subject: Re: Redirecting internal tcp connections
Date: Fri, 15 Apr 2005 15:17:26 -0500 [thread overview]
Message-ID: <42602156.50403@riverviewtech.net> (raw)
In-Reply-To: <1113587876.10134.5.camel@nostromo.bgsecm.com>
> You have to do this in the nat table and the prerouting or
> output chain, and you should use DNAT instead of REDIRECT,
> because REDIRECT is for packets with destination your own
> machine. So we have:
>
> iptables -t nat -A PREROUTING -p tcp --dport 515 -j DNAT --to-
> destination remotehost.com:900
I would suggest that you add a destination match as well so that you don't blindly redirect traffic destend to any system's LPD port. I.e. make your IPTables like look like this:
iptables -t nat -A PREROUTING -p tcp -d remotehost.com --dport 515 -j DNAT --to-destination remotehost.com:900
Grant. . . .
prev parent reply other threads:[~2005-04-15 20:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-15 17:12 Redirecting internal tcp connections marcus
2005-04-15 17:57 ` Jose Maria Lopez Hernandez
2005-04-15 20:17 ` Taylor, Grant [this message]
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=42602156.50403@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=jkerouac@bgsec.com \
--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 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.