LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Port forward help please (https://www.linuxquestions.org/questions/linux-networking-3/port-forward-help-please-58152/)

hanxuerui 05-04-2003 11:23 PM

Port forward help please
 
I have searched the forum, there are some topic talking about iptables that seems could do what I needed.

What I am doing is: I want to run my web server on 8080 by using another userid other then root. But port 80 will not available for a regular user id. Then I think I need a port forward, forward a request from 80 to port 8080.

I tried a couple times, but it it just not working for me.

Can somebody please write the command down here?

mayankjohri 05-05-2003 06:30 AM

why it will not allow to let u run on port 80. can't u specify to do anyway have a look at
http://kreiger.linuxgods.com/kiki/?P...with+netfilter

hanxuerui 05-05-2003 08:53 AM

The error information is:
2003-05-05 07:51:10,107 : Http11Protocol.init : Error initializing endpoint
java.net.BindException: Permission denied:80

With root id as the service id it is okay.

hanxuerui 05-05-2003 10:51 AM

iptables is so hard to understand (8-[

I will keep trying. I do not have too long expirence on Linux

hanxuerui 05-05-2003 10:52 AM

If you happened have done samething, please let me know what you have done.

hanxuerui 05-05-2003 01:19 PM

I got it working!

here is my answer: to the same machine from 80 to 8080:

iptables -t nat -I PREROUTING 1 -p tcp --dport 80 -j REDIRECT --to-port 8080

hanxuerui 05-05-2003 01:20 PM

Thanks mayankjohri. The information helps a lot.


All times are GMT -5. The time now is 06:28 AM.