All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Scherf <tscherf@web.de>
To: Sundaram Ramasamy <sun@percipia.com>, netfilter@lists.netfilter.org
Subject: Re: port redirect for localy generated request
Date: Sat, 30 Aug 2003 10:04:01 +0200	[thread overview]
Message-ID: <200308301004.02160.tscherf@web.de> (raw)
In-Reply-To: <000801c36e35$3f7cee60$8c01a8c0@RSUNDARAM>

> With this rule incoming request for port 80 redirected to port 8080. But
> this is not working localy generated request.
> iptables -t nat -A PREROUTING -p tcp --dport 80 -d LISTEN_IP -j DNAT --to
> LISTEN_IP:80

You have to use the OUTPUT Chain for localy generated packets:

iptables -t nat -A OUTPUT -p tcp --dport -d $LISTEN_IP -j DNAT --to 
$LISTEN_IP:8080


Greetings,
Thorsten Scherf
RHCE, RHCX


      parent reply	other threads:[~2003-08-30  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-29  1:36 Multicast routing question Guilherme Cox
2003-08-29 13:55 ` port redirect for localy generated request Sundaram Ramasamy
2003-08-30  3:33   ` port redirect for locally " Mark E. Donaldson
2003-08-30  8:04   ` Thorsten Scherf [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=200308301004.02160.tscherf@web.de \
    --to=tscherf@web.de \
    --cc=netfilter@lists.netfilter.org \
    --cc=sun@percipia.com \
    /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.