From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: Local Port Forwarding.
Date: Fri, 22 Apr 2005 17:57:56 -0400 [thread overview]
Message-ID: <20050422215756.GA5739@bender.817west.com> (raw)
In-Reply-To: <1114206098.6690.5.camel@cautin2.dcsc.utfsm.cl>
On Fri, Apr 22, 2005 at 05:41:38PM -0400, Alejandro Villarroel wrote:
> Hello:
> I'm kind of new to IpTables, and I'm having problems to do this kind of
> port forwarding in my Fedora Core 3:
>
> Suppose I have some user trying to access Host X:Port X on the Internet
> from my Linux, but Instead of that I want to forward this traffic to the
> localhost:Port Y, what rule I have to apply?
your kernel needs to be compiled with the option to nat local
connections:
CONFIG_IP_NF_NAT_LOCAL=y
(i *believe* that FC3 includes this in their kernel--don't quote me on
that)
with that, you can DNAT local connections in the nat table, OUTPUT
chain:
iptables -t nat -A OUTPUT -p tcp -d $HostX --dport $PortY \
-j DNAT --to-destination $LocalHost:$PortY
HTH...
-j
--
"Diane: Tom, you're so deep in the closet you're finding Christmas
presents."
--Family Guy
next prev parent reply other threads:[~2005-04-22 21:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-22 21:41 Local Port Forwarding Alejandro Villarroel
2005-04-22 21:57 ` Jason Opperisano [this message]
2005-04-22 22:02 ` Taylor, Grant
2005-04-22 22:07 ` Jason Opperisano
2005-04-27 20:48 ` Nick Drage
2005-04-27 21:00 ` Jason Opperisano
2005-04-26 12:59 ` Alejandro Villarroel
2005-04-22 21:59 ` Taylor, Grant
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=20050422215756.GA5739@bender.817west.com \
--to=opie@817west.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.