From: Henry Ritzlmayr <h.ritzlmayr@gmx.at>
To: Netfilter Mailing List <netfilter@lists.netfilter.org>
Subject: RE: Masquerading on local ports
Date: 20 Mar 2003 17:26:49 +0100 [thread overview]
Message-ID: <1048177609.1493.127.camel@localhost.localdomain> (raw)
In-Reply-To: <FD8F124A387AD6119F7900A0D218B321019C75@hslex01.hslbz.local>
Am Don, 2003-03-20 um 16.29 schrieb Rob Sterenborg:
> > And here is the question. How is it possible to nat a lokal port?
> >
> > IPTABLES -t nat -A PREROUTING -p tcp -d 127.0.0.1
> > --destination-port 81 -j DNAT --to-destination 127.0.0.1:80
> >
> > telnet localhost 80 <<< works
> > telnet localhost 81 <<< Connection refused
>
> iptables -t nat -A PREROUTING -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT
> --to-ports 81
>
>
> Rob
Tanks for the answer,
I tried that one already but it behaves the same.
I also tried
IPTABLES -t nat -A PREROUTING -p tcp -d 172.16.172.12 --destination-port
81 -j REDIRECT --to-ports 80
wich works perfect for both port 80 and 81 from a foreign host.
Henry
next prev parent reply other threads:[~2003-03-20 16:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-20 14:03 Masquerading on local ports Henry Ritzlmayr
2003-03-20 15:29 ` Rob Sterenborg
2003-03-20 16:14 ` henry ritzlmayr
2003-03-20 16:26 ` Henry Ritzlmayr [this message]
2003-03-20 18:34 ` alexb
2003-03-21 7:22 ` Joel Newkirk
2003-03-21 17:17 ` Henry Ritzlmayr
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=1048177609.1493.127.camel@localhost.localdomain \
--to=h.ritzlmayr@gmx.at \
--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