From: Alexis <alexis@attla.net.ar>
To: "Martinez, Michael" <MMARTINEZ@CSREES.USDA.GOV>
Cc: Antony Stone <Antony@Soft-Solutions.co.uk>,
Netfilter <netfilter@lists.netfilter.org>
Subject: RE: Instructions on how to redirect port 80 to port 8080
Date: Wed, 18 Feb 2004 14:28:33 -0300 [thread overview]
Message-ID: <1077125312.1589.4.camel@pepelui.baicom> (raw)
In-Reply-To: <9908FCB837A50642B74E2BEC198843095CC652@csrees-exchsrvb.csrees.usda.gov>
and `hostname` what ip address resolve??
On Wed, 2004-02-18 at 11:06, Martinez, Michael wrote:
> --> On Tuesday 17 February 2004 7:10 pm, Alexis wrote:
> -->
> --> > iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to
> --> > x.x.x.x:8080
> -->
> --> You might prefer to use REDIRECT - it's like DNAT, but only
> --> allows you to
> --> specify the port number, and forces the IP address to the
> --> local machine:
> -->
> --> iptables -A PREROUTING -t nat -d a.b.c.d -p tcp --dport 80
> --> -j REDIRECT --to
> --> 8080
> -->
>
> This isn't working. I can "telnet `hostname` 8080" and get an http
> response, but when I do "telnet `hostname` 80" the response I get is
> "telnet: Unable to connect to remote host: Connection refused."
>
> Here's my iptables-save output:
>
> # Generated by iptables-save v1.2.8 on Wed Feb 18 09:09:04 2004
> *nat
> :PREROUTING ACCEPT [44:5084]
> :POSTROUTING ACCEPT [43:2580]
> :OUTPUT ACCEPT [43:2580]
> -A PREROUTING -d 199.128.238.12 -p tcp -m tcp --dport 80 -j REDIRECT
> --to-ports 8080
> COMMIT
> # Completed on Wed Feb 18 09:09:04 2004
> # Generated by iptables-save v1.2.8 on Wed Feb 18 09:09:04 2004
> *filter
> :INPUT ACCEPT [0:0]
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [417:40204]
> :RH-Firewall-1-INPUT - [0:0]
> -A INPUT -j RH-Firewall-1-INPUT
> -A FORWARD -j RH-Firewall-1-INPUT
> -A RH-Firewall-1-INPUT -i lo -j ACCEPT
> -A RH-Firewall-1-INPUT -p icmp -m icmp any -j ACCEPT
> -A RH-Firewall-1-INPUT -p esp -j ACCEPT
> -A RH-Firewall-1-INPUT -p ah -j ACCEPT
> -A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j
> ACCEPT
> -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j
> ACCEPT
> -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
> COMMIT
> # Completed on Wed Feb 18 09:09:04 2004
>
>
> Mike Martinez
--
Alexis <alexis@attla.net.ar>
next prev parent reply other threads:[~2004-02-18 17:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 14:06 Instructions on how to redirect port 80 to port 8080 Martinez, Michael
2004-02-18 14:19 ` Antony Stone
2004-02-18 17:28 ` Alexis [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-18 19:19 Martinez, Michael
2004-02-18 19:06 Martinez, Michael
2004-02-18 19:10 ` Antony Stone
2004-02-18 18:47 Martinez, Michael
2004-02-18 19:02 ` Antony Stone
2004-02-18 17:47 Martinez, Michael
2004-02-18 16:07 Martinez, Michael
2004-02-18 16:21 ` Antony Stone
[not found] <9908FCB837A50642B74E2BEC198843095CC655@csrees-exchsrvb.csrees.usda.gov>
2004-02-18 15:01 ` Fabian Hartmann
2004-02-18 15:11 ` Antony Stone
2004-02-18 14:41 Sven-Åke Larsson
2004-02-18 14:31 Martinez, Michael
2004-02-18 15:08 ` Antony Stone
2004-02-17 19:24 Martinez, Michael
2004-02-17 18:55 Martinez, Michael
2004-02-17 19:04 ` Alexis
2004-02-17 19:10 ` Alexis
2004-02-17 19:30 ` Antony Stone
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=1077125312.1589.4.camel@pepelui.baicom \
--to=alexis@attla.net.ar \
--cc=Antony@Soft-Solutions.co.uk \
--cc=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