Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I saw a tutorial about redirecting client requests to a specific port to a VM inside the server using IPTables.

Is there a way to redirect client requests for to a VM using only IPTables?

or should I go for squid proxy server?

share|improve this question

1 Answer 1

If is the only web server listening on that IP, it should be relatively easy, since you would just redirect all port 80 traffic.

If there are other web servers for that IP, you can use string matching in iptables:

but note the caveat in the documentation, about how a proxy would be a better choice.

share|improve this answer
thanks :D btw, do you know any easy-to-follow tutorial for this? – user269334 May 22 '12 at 0:23
Ubuntu has fairly extensive community documentation. For example: – cjc May 22 '12 at 1:30

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.