Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Michael Martinez <mmartinez@csrees.usda.gov>
To: netfilter@lists.netfilter.org
Subject: I'm having difficulty making port redirection work
Date: 30 Jun 2003 15:37:00 -0400	[thread overview]
Message-ID: <1057001820.1133.40.camel@localhost.localdomain> (raw)

Hi all -

I've used ipchains before, but I'm brand new to iptables, and I'm having
difficulty getting port redirection to work.

Here's what I want to do: I've got a Redhat 8.0 box running iptables
1.2.6a2. I've got a web application listening on port 8888 (on the eth0
interface) and  I'd like any web traffic coming in on port 80, to be
redirected to port 8888.

In ipchains, this is handled with the following line in
/etc/sysconfig/ipchains:

-A input -d 192.73.224.127 80 -p tcp -j REDIRECT 8888

I am using the following lines at the beginning of
/etc/sysconfig/iptables, but it does not work. I'm getting no messages
in /var/log/messages, and I don't know of any place where iptables is
logging anything:

*nat
-A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8888
COMMIT

How do I troubleshoot and fix this?

thank you -

-- 
Michael Martinez
Linux System Administrator
Marlaw Systems Technology Inc.
CSREES/ISTM/USDA
mmartinez@csrees.usda.gov


             reply	other threads:[~2003-06-30 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30 19:37 Michael Martinez [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-06-30 22:59 I'm having difficulty making port redirection work George Vieira
2003-07-01 12:25 ` Michael Martinez
2003-07-01 11:13   ` Oskar Andreasson

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=1057001820.1133.40.camel@localhost.localdomain \
    --to=mmartinez@csrees.usda.gov \
    --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