• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ DNS only login

Pluto

Member
Joined
Jun 14, 2017
Messages
22
Reaction score
9
Location
Poland
Is it possible to let people connect ONLY via domain names and not addresses? Example: I have 2 domains: d1, d2, both pointing to ip1. My goal is to allow connections to ots1 only via d1, not allowing d2, and for ots2: reject d1, allow d2. I did some redirects for http, but what to do for OTS connections? Any ideas?
 
What you mean is Name-Based Virtual Host. That works well in Apache2.

But for OTServ it won't work as it is currently completely ignoring domain name. It listens only on IP.

You want to host two servers on 1 IP. And that won't work with the current implementation.

You can either host on different ports, or implement such Name-Based Virtual Host like it is in Apache2, with TFS and OTClient, but that won't be easy, as with every request to TFS/OTS, you need to add domain name.

#edit
Or even better - some companies offer so-called "failover" IPs, which you can add to your dedicated server. Then your dedicated server has more IPs - and so you can host more OTServers on it.
 
Last edited:
@slawkens Thanks for the answer. I'm bit worried that players using IP CHANGER won't change default port and will connect to different server, then "wrong password" will pop up and they will get confused. I guess this will be difficult task for classic client (or even impossible), time will tell how many fail to connect :)
 
Back
Top