Hello, i want to redirect a subdomain (ex. server1.mydomain.com) to an other ip/port
server1.mydomain.com => 85.xxx.xx.xxx:6064 server2.mydomain.com => 41.xxx.xx.xxx:25565
I have full permission to the first domain. My server is running Ubuntu 14 and it would be awesome if i could do that from the DNS records. How can i achieve that?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
hello i have same question…
Click below to sign up and get $100 of credit to try our products over 60 days!
Same problem here!
I have the same question
Sorry i forgot to mention that :) I dont know if an A record can be used to redirect TCP traffic. Since the client is looking for the default port (25565) an A record can be used only if the server is listening on that port.
What kind of traffic are you serving on those ports?
Either way, the first step would be to point the subdomains to the IP addresses using a DNS A record. Check out this tutorial for help: How To Set Up and Test DNS Subdomains with DigitalOcean’s DNS Panel
If you are just serving standard HTTP traffic, then you’ll probably just want to set up an Nginx proxy that listens on port 80 and redirects requests to the appropriate port. If it’s something else, you will most likely want to look into SRV records.