From: Bertram Scharpf <lists@bertram-scharpf.de>
To: netfilter@vger.kernel.org
Subject: Port forwarding inside router
Date: Sat, 3 Nov 2007 00:10:02 +0100 [thread overview]
Message-ID: <20071102231002.GA16374@bart.bs.l> (raw)
Hi,
sorry, I have to ask another time. I do port forwarding for
a host inside my local domain. Say my router is 192.168.7.1,
the HTTP hosting machine is 192.168.7.33; queries from
outside reach it perfectly and those from for example
192.168.7.80 do as well. The commands that do this are
dst=192.168.7.33
prt=80
src=192.168.7.1
$IPT -t nat -A PREROUTING -i ppp0 -p tcp --dport $prt -j DNAT --to $dst:$prt
$IPT -t nat -A PREROUTING -d $src -p tcp --dport $prt -j DNAT --to $dst:$prt
$IPT -t nat -A POSTROUTING -d $dst -m conntrack --ctorigdst $src -j SNAT --to $src
The only host that doesn't reach 192.168.7.33 is the router
itself. Now I desire to run a proxy on the router. I want
calls to 127.0.0.1, to 192.168.7.1 and to its ppp0 address
_from_ the router to be redirected to 192.168.7.33. They
don't.
router ~ # telnet 192.168.7.1 80
Trying 192.168.7.1...
Connected to 192.168.7.1.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
router ~ # /etc/init.d/lighttpd stop
* Stopping lighttpd ... [ ok ]
router ~ # telnet 192.168.7.1 80
Trying 192.168.7.1...
telnet: connect to address 192.168.7.1: Connection refused
router ~ #
What do I miss?
Thanks in advance,
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
reply other threads:[~2007-11-02 23:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20071102231002.GA16374@bart.bs.l \
--to=lists@bertram-scharpf.de \
--cc=netfilter@vger.kernel.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