Principles

  • Only open to the Internet the ports that players need: ConnectServer and each GameServer (plus the Launcher / website if you use them).
  • Internal ports (GameServer connecting to ConnectServer / LoginServer / ServerLink, SQL Server) must not be opened to the Internet. By default those programs only listen on 127.0.0.1 (GameServer.ListenIP = "127.0.0.1").
  • All ports below are TCP. The values are the sample values in the package; if you change a value in a file, open the port according to the changed value.
  • Server behind a router / modem: besides Windows Firewall, you also need to forward the ports (NAT / port forward) from the public IP to the server's LAN IP. Rented server (VPS, dedicated): also open them in your provider's firewall control panel.

Ports for players (open to the Internet)

Sample port Program Where to set it Purpose
44406 ConnectServer 1.ConnectServer\connectserver.conf → Client.Port The client fetches the server list. Must match the port specified in the client.
55521 GameServer sub 0 (Non-PvP) Data\ServerMap.xml → ServerPort of ServerCode="0" Players enter the sub-server
55522 GameServer sub 1 (PvP) same as above (ServerCode="1") same as above
55523 GameServer sub 2 (Gold / VIP) same as above (ServerCode="2") same as above
55937 / 55938 / 55939 GameServer ArkaWar / Event / Siege same as above (ServerCode="17" / "18" / "19") Players are moved to these hidden subs; the ports must still be open.
55541 - 55543, 55957 - 55959 GameServer group 2 same as above (ServerCode 20 - 22, 37 - 39) Only if you run group 2
44461 START (Launcher port) START.ini → [LauncherGateway] Port Launcher registration / login / password change. Only needed if you use the TSWMU Launcher.
80 Website (IIS) TswSetup Players access the website. Only if you host the website on this server yourself.
2020 Launcher Update (IIS) TswSetup The Launcher downloads update files. Only if you use this feature on the server.

The number of GameServer ports equals the number of subs you enable: each <Server> line running in ServerMap.xml needs its ServerPort opened.

Internal ports (do not open to the Internet)

Sample port Program Where to set it Purpose
44422 ConnectServer connectserver.conf → GameServer.Port; game_common.conf → ConnectServer.Port GameServer reports its status to ConnectServer
44430 LoginServer loginserver.conf → GameServer.Port; game_common.conf → LoginServer.Port GameServer verifies accounts
55566 ServerLink serverlink.conf → GameServer.Port; game_common.conf → ServerLink.Port Guild, Gens, party across GameServers
1433 SQL Server SQL Server Configuration Manager Database (AccountDB, GameDB, LogDB)
44450 START (remote EDITOR port) START.ini → [EditorGateway] Port EDITOR on another machine connects through START. Only needed if you enable this feature (Enabled=1); you should fill in AllowedIps to restrict IPs.
According to [Website] Port START (website API port) START.ini → [Website] Port (default 44480 when not specified) The website on hosting calls the START API. Only open it to the hosting IP (see below).

Website API port

If the website runs on rented hosting, the hosting must be able to reach the START API port. Do not open this port to all IPs: enter the hosting IP in START → Settings → Website Management → Allowed IPs ([Website] AllowedIps) and keep [WebGuard] Firewall = 1 enabled (default): START automatically creates a Windows Firewall rule that only allows the hosting IP into this port. On the modem you still have to forward the port to the server. See also the game website setup section.

Opening ports on Windows Firewall

Open PowerShell as Administrator and run the following for each port you need to open (replace the port number):

New-NetFirewallRule -DisplayName "MU ConnectServer 44406" -Direction Inbound -Protocol TCP -LocalPort 44406 -Action Allow
New-NetFirewallRule -DisplayName "MU GameServer 55521-55523" -Direction Inbound -Protocol TCP -LocalPort 55521-55523 -Action Allow

Or use the interface: Windows Defender Firewall with Advanced Security → Inbound Rules → New Rule → Port → TCP → enter the port → Allow the connection.

Checking that the ports are open

  1. Start the server in START.
  2. On another machine outside the server's network, run: Test-NetConnection <public-IP> -Port 44406 (PowerShell) and check that TcpTestSucceeded is True.
  3. Repeat for each GameServer port.
If START reports that a port is in use when starting a server ("Cannot start ...: port ... is being used by another program"), START tells you which program is holding the port. Change the port in the .conf file or close that program, then start again.