I have a web server running on my server on port 7000. I want it to be accessible on port 80. I've read that this could be easily done with iptables port forwarding. What would the correct command would be to achieve that?

E

link|improve this question

75% accept rate
2  
Belongs on serverfault.com – Paul R Feb 4 '11 at 17:29
feedback

migrated from stackoverflow.com Feb 4 '11 at 17:59

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

You can try something along the lines of this:

iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 7000
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.