Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NAT question Port redirection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jft
n00b
n00b


Joined: 09 Aug 2005
Posts: 1

PostPosted: Tue Aug 09, 2005 12:15 pm    Post subject: NAT question Port redirection Reply with quote

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
View user's profile Send private message
bin-doph
Guru
Guru


Joined: 23 May 2003
Posts: 302

PostPosted: Tue Aug 09, 2005 1:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum