How do I run multiple servers from one IP address?
I am assuming I probably have to go into my router and assign subdomains to the machines that will be playing host.
Something like: mangband.theinn.publicvm.com and pwmangband.theinn.publicvm.com
Never done this before...any help is appreciated.
Running Multiple Servers from one DNS
-
- Vorpal Bunny
- Posts: 23
- Joined: Thu 21.04.2016, 19:28
-
- Vorpal Bunny
- Posts: 23
- Joined: Thu 21.04.2016, 19:28
Re: Running Multiple Servers from one DNS
Maybe I am approaching this from the wrong perspective. How are ports handled between the server and the client. I have both of my servers set to different ports in the mangband.cfg file and I have my router set up to forward packets for the right ports to the right machines. Yet when clients connect, they always connect to the machine that is using the default port. How do the clients determine what port to communicate on?
Re: Running Multiple Servers from one DNS
Isn't the port hardcoded? Something like 8602 in netserver.c?
Re: Running Multiple Servers from one DNS
A bit late to the party, but probably still worth answering.TheHairyOne wrote: ↑Mon 09.05.2016, 01:53Maybe I am approaching this from the wrong perspective. How are ports handled between the server and the client. I have both of my servers set to different ports in the mangband.cfg file and I have my router set up to forward packets for the right ports to the right machines. Yet when clients connect, they always connect to the machine that is using the default port. How do the clients determine what port to communicate on?
It works pretty much like any other networking software: the port is specified server-side via the TCP_PORT mangband.cfg option.
On client side, port can be provided during manual server address entry ("HOST:PORT") or via command line (./mangclient HOST PORT).
Naturally, port number is supplied by the meta-server, when client asks for a list of available servers. And when servers report to meta, they tell what port they use. It's not reflected on, say, "Online Servers" list on our webpage, but it's there.
-
- Mangy-Looking Leper
- Posts: 3
- Joined: Thu 29.10.2020, 18:21
Re: Running Multiple Servers from one DNS
Well, I'm glad you answered late, because as an even later newcomer, this is what the info I was looking for, my servers are now online and working. Thanks!