Search code examples
urlhttp-redirectdnsmining

How do I perform a DNS redirect for applications not using HTTP? (Context: Mining Pool)


So, I'm putting together a small mining pool server on a VPS for educational purposes. I have a domain name that redirects to the server's IP on port 8000 which is where the software's included "example website" is hosted. I have masking turned on so the server's IP address isn't revealed.

Let's say the domain name is foo.com and the IP of the server is 1.1.1.1

So, www.foo.com redirects to 1.1.1.1:8000

Now, the mining pool software expects connections from miners on port 3333 by default. I'd like for miners to be able to type in "pool.foo.com:3333" into their mining software to be able to connect. So, I set up a subdomain redirect (Without masking) so that:

pool.foo.com redirects to 1.1.1.1

Now, when I put "pool.foo.com:3333" into the miner software, it cannot connect, but 1.1.1.1:3333 works fine.

How can I redirect my URL properly in a case like this?


Solution

  • Solved! I was incorrectly using the "Forwarding" settings in the DNS manager. I thought these settings were just a simpler interface that created the A and CNAME records for you, but instead they create an iFrame with contains whatever is at the IP address you enter, instead of actually pointing the domain to that IP. After creating the proper A and CNAME records, my miner connects correctly.