* Port forwarding inside router
@ 2007-11-02 23:10 Bertram Scharpf
0 siblings, 0 replies; only message in thread
From: Bertram Scharpf @ 2007-11-02 23:10 UTC (permalink / raw)
To: netfilter
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-02 23:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-02 23:10 Port forwarding inside router Bertram Scharpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox