View previous topic :: View next topic |
Author |
Message |
jft n00b
Joined: 09 Aug 2005 Posts: 1
|
Posted: Tue Aug 09, 2005 12:15 pm Post subject: NAT question Port redirection |
|
|
Hi gentoo'S,
I have the following question.
I have a DSL router which is only able to do >>port forwarding<< no redirection
So I set up the DSL router to forward incoming internet traffic on port 9000 to an internal linux box (192.168.10.2) This box should
redirect the traffic to a "Sat Receiver - running linux (192.168.10.3)" with an embedded Webserver on port 80. And the traffic
should go back to the internet on port 9000.
How can I realise this with iptables?
I did some testings with redirection but it doesn't worked as it shoud...
cheers
joerg |
|
Back to top |
|
|
bin-doph Guru
Joined: 23 May 2003 Posts: 302
|
Posted: Tue Aug 09, 2005 1:23 pm Post subject: |
|
|
Something like this could work (untested)
Code: | # route/redirect incoming traffic
iptables --table nat --insert PREROUTING --protocol tcp --dport 9000 --jump DNAT --to 192.168.10.3:80 |
The outgoing stuff could work without further configuration if you use connection-tracking, if not I'd try see POSTROUTING/SNAT in the iptables docs
hth
-fe _________________ perl -e '$_=q;4a75737420616e6f74686572205065726c204861636b65720as;;for(s;s;s;s;s;s;s;s;s;s;s;s){s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}' |
|
Back to top |
|
|
|