Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?


share|improve this question

migrated from Feb 4 '11 at 17:59

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

1 Answer 1

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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