Running Multiple Servers from one DNS

All your MAngband related technical questions answered. Problems compiling or running the game/server? No problem! Ask here.
Post Reply
TheHairyOne
Vorpal Bunny
Posts: 23
Joined: Thu 21.04.2016, 19:28

Running Multiple Servers from one DNS

Post by TheHairyOne » Sat 07.05.2016, 20:19

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.

TheHairyOne
Vorpal Bunny
Posts: 23
Joined: Thu 21.04.2016, 19:28

Re: Running Multiple Servers from one DNS

Post by TheHairyOne » Mon 09.05.2016, 01:53

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?

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Running Multiple Servers from one DNS

Post by PowerWyrm » Sun 22.05.2016, 13:26

Isn't the port hardcoded? Something like 8602 in netserver.c?

User avatar
Flambard
King Vampire
Posts: 259
Joined: Wed 20.06.2007, 10:49

Re: Running Multiple Servers from one DNS

Post by Flambard » Mon 27.04.2020, 17:05

TheHairyOne wrote:
Mon 09.05.2016, 01:53
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?
A bit late to the party, but probably still worth answering.

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.

MiGFulcrum
Mangy-Looking Leper
Posts: 3
Joined: Thu 29.10.2020, 18:21

Re: Running Multiple Servers from one DNS

Post by MiGFulcrum » Fri 30.10.2020, 18:30

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!

Post Reply