Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 3.15 KB

README-connector.adoc

File metadata and controls

73 lines (46 loc) · 3.15 KB

MapTool Connection Server

This document describes a technique for MapTool hosts to avoid the network complexity of hosting on their person system.

The goal is to create a cloud-based Docker container that acts as a relay for MapTool traffic.

Before implementing the tunnel, gather some information first:

  1. IP address of the cloud container: ____________________________________ (we’ll use 1.2.3.4)

  2. Port the MapTool server be listening on: ____________ (we’ll use 51234)

  3. Port the container will be forwarding: ____________ (we’ll use 55555)

As shown in [Overview], there are four steps.

MCS
Figure 1. Overview

1. Start the MapTool Connection Server

The container image is hosted on Docker Hub. It can be easily imported into Amazon Web Services, Microsoft Azure, or other cloud services.

The system hosting the MapTool server should upload a public key to the maptool user in the container to allow for simpler SSH connection in the next step. (Typically, the public key would be appended to the ~/.ssh/authorized_keys file. There are many sources of information for how to do this. If your local system is Un*x-based, try this web article.)

There will be two incoming network ports that need to be open on the container: the one for the SSH server (usually port 22), and whatever port clients will be connecting to (this guide uses 55555).

2. Start SSH Connection to the MCS

The system hosting MapTool connects to the container using SSH and sets up a remote port forwarding tunnel.

Connecting to the container can be done with any SSH client; PuTTY is a common choice on Windows, while Un*x systems typically have SSH clients pre-installed.

When connecting to the container, specify maptool as the username and use the key configured in the previous step.

Configure the SSH client to open port 55555 on the container and forward all connections back to port 51234 on the local system.

Sample command line:

ssh -R 51234:0.0.0.0:55555 [email protected]

This command will continue to run for as long as you want clients to connect to your MapTool server. When SSH terminates, all connected clients will be disconnected.

3. Start MapTool Server on the Local System

Use the chosen port number for the MapTool server to start it. Be sure to turn off UPNP.

This document uses 51234 for the port number, but any number greater than 5000 should be possible on all platforms (Windows, Linux, and macOS).

4. Players Start MapTool and Connect to the MCS

One or more clients connect to the container and are forwarded to the MapTool server by SSH automatically.

When clients connect to 1.2.3.4:55555, they will be connected to the SSH port on the container. SSH will then tunnel the packets back to the host’s system where they will be delivered to port 51234. Since MapTool is listening on that port, the client will be connected to the server.