2

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 domain.com 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?

1 Answer 1

-1

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
</Proxy>

ProxyPass /music http://127.0.0.1:11011/
ProxyPassReverse /music http://127.0.0.1:11011/

<Location /music>
Allow from all
</Location>

Just be sure to uncomment mod_proxy and its reverse from the apache modules section of the config. And change the 127.0.0.1:port 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 mc.domain.com with no port specified, assumes port 25565. Http traffic assumes port 80, ssl is 443, etc.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .