Currently, I'm using iptables to redirect incoming requests for "website.com:27015" to "xx.xx.xx.xx:27015". Problem is, since iptables redirects via the port 27015, I can only redirect to one single location.

But since I want to expand the number of locations I can reroute to, I'm searching for a method to reroute via the URL+PORT now.


dm.website.com:27015 reroutes to yy.yy.yy.yy:27020
private.website.com:27015 reroutes to xx.xx.xx.xx:27015

(same url, different subdomains)

Any suggestions/solutions for this problem are greatly appreciated! ^^

Edit: Need to listen for UDP connections as well as TCP

  • Then why would you tag nginx? – muru Jan 7 '15 at 22:21
  • I was not aware that it was TCP only. – Otoris Jan 7 '15 at 22:25
  • I think clarifying the reason why you want to do this would help suggest an appropriate solution to your task. Is it for redundancy, high-availability, etc.? Perhaps a reverse proxy webserver would be better suited for the task? – Marcin Kaminski Dec 5 '15 at 0:59

"If all you have is a hammer, every problem looks like a nail..."

You need DNS redirection ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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