Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Send port 80 -> 8080
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
IamtheOne
Apprentice
Apprentice


Joined: 27 Sep 2002
Posts: 158
Location: Iowa

PostPosted: Fri Mar 21, 2003 2:07 am    Post subject: Send port 80 -> 8080 Reply with quote

Could someone please point me in the direction where I could figure out how to send traffic coming in to my computer on port 80 to port 8080 on my machine?

Thanks.
Back to top
View user's profile Send private message
Liathus
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 163
Location: Fargo, ND

PostPosted: Fri Mar 21, 2003 6:47 am    Post subject: Reply with quote

Ok I just want to make sure that we are on the same page here. When you say that you want to redirect traffic from port 80 to port 8080 are you talking about one machine? If that is the case you could most likely tell the program that is listening on port 8080 to use port 80 instead (perhaps both ports). If you are talking about forwarding traffic to another machine, you could use iptables.

A command like this in your iptables config should do the trick.

iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -d 24.116.189.179 -j DNAT --to 192.168.1.1:8080

Of course you will need to make sure that iptables and full nat are enabled in your kernal. You would also need to change that IP address to match your setup.

I hope this helps
Back to top
View user's profile Send private message
IamtheOne
Apprentice
Apprentice


Joined: 27 Sep 2002
Posts: 158
Location: Iowa

PostPosted: Fri Mar 21, 2003 6:59 am    Post subject: Reply with quote

Yeah, one machine...

The main problem is I have the server running non-root, so it can't bind below 1000.

Can't iptables redirect locally?
Back to top
View user's profile Send private message
Liathus
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 163
Location: Fargo, ND

PostPosted: Fri Mar 21, 2003 7:15 am    Post subject: Reply with quote

I'm not quite sure. I have never attempted it. I guess you could give it a shot.
BTW, what application are you running? apache I assume?
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