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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interested in knowing if I can force a redirect to different ip's for those clients that pass into certain port of my web server. Specifically I'm attempting to get all web(80) traffic to goto server one on whilst every client connecting on say port 27015, 55565, 21, 22, etc. of same domain routed IP are forwarded to different server on unconnected network. I'm fine with this working vice-verca if I need to, where the apache server running on game boxes forward to website host. Any Ideas?

share|improve this question

Well port 21 is supposed to be FTP unsecure. Not sure if you're running that on a "game box." If you're using Apache as the external server and trying to map it to other servers and ports, your best bet is to use apache mod_proxy and mod reverse proxy. Here's a sample config:

#Port Re-mapping:
#Subsonic runs on 11011 at the moment.

ProxyRequests     Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all

ProxyPass /music
ProxyPassReverse /music

<Location /music>
Allow from all

Just be sure to uncomment mod_proxy and its reverse from the apache modules section of the config. And change the to the port and local IP of the "game boxes"

And for the port thing, all of these requests are served on the external IP/port of the apache server. If you are trying to serve non-HTTP requests (a real game server) then you are better off using a NAT or DNS load balancer for this, and the client should connect to the default port. (Example: connecting to a minecraft server at with no port specified, assumes port 25565. Http traffic assumes port 80, ssl is 443, etc.)

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.