How to join and host a game of MegaMek - MegaMek/megamek GitHub Wiki

From this Reddit Post

Disclaimer: You'll need to be comfortable with editing router settings. If your first question is "What is a router?", then you might want do some googling and watching some YouTube Videos.

Also, this will NOT cover setting up a dedicated server.

Joining a Game: For this you just need the number of the open port, let's say 2346, and the host's external IP address.

Hosting a Game: First, you need to get to the router settings. To do this you put your routers local IP in the search bar at the top of your browser. This should be something like: "192.168.0.1"

Depending on your router you should check out this. Generally the settings you need are going to be in advanced configurations, next go to NAT/PAT configuration, here you can add a application/service.

Next, set the port you want to use. For the internal and external port I used the same number (MegaMek defaults to 2346). MegaMek uses TCP but you can set it to use both just to be sure. Then you need to set the device as your PC before finally saving.

Now, you need to go to the firewall settings (you'll need to google how to do this) and put it to the setting that allows NAT/PAT access, most likely the weakest setting. I would recommend closing the port and using the normal firewall settings when you're not hosting a game.

The last two things are done in MegaMek and are optional.

  1. You can set a password. It's not for getting into your game, but rather for changing the game options.

  2. You can register your game on the MegaMek website. It adds it to the active server list on it. I've never tried to join a game there myself, so I can't say much more about it.

Also see here.