Links

IP Address

Depending upon the configuration of your server you may need to be more aware of its IP address configuration and how it relates to your game server.
This guide is not designed to be an in-depth guide to networking, instead focusing on parts relevant to game servers.

Internet Server vs. Local Server

Your game server can be hosted online using a server provider such as Linode or on a local network at your house for either local-only LAN parties or allowing online players in through your router.

Network Interfaces

All computers will have some sort of network interface (ethernet, fiber optic, wi-fi) to connect to a network. On Linux, you can see your server's interfaces by using the following command.
ip -o link show
Typically you may see (depending on distro) a localhost loopback interface and an eth0 interface. The eth0 (Ethernet) is used for your standard copper network cable and is what you will likely see. If you have multiple interfaces you may also see eth1, eth2, etc. More advanced setups can choose to bond together interfaces to work as one to increase bandwidth and resilience.

Virtual Private Networks

Some servers may be connected to a VPN (Virtual Private Network) using software such as Wireguard or OpenVPN. This normally creates its own interface that gets allocated an IP address. It is possible to use a VPN to create a private connection to a LAN server

IP Address Allocation

Each network interface can be allocated an IP address either manually on the server or via DHCP. If you are using a provider an internet IP address is normally automatically allocated to your server. For a local network, your router DHCP server will allocate a local IP address. A local IP address can be reserved using DHCP or you can manually set an IP on the server.
Game Servers will typically bind (attach a network socket) to all available IP addresses making the game server available on all networks. However, sometimes a particular IP address may need to be specified if you only want a particular network to access it or the game server requires it.

Single Server IP Address

The simplest and most common server configuration will have one network interface and thus one IP address. When your game server starts it will simply listen and bind to this IP address.

Multiple Server IP Addresses

Some servers will have multiple network interfaces available, allowing for multiple IP addresses to be assigned to your server. In this configuration, a server might listen and bind itself to all IP addresses or just one (depending on the game server).

Multihome

If you have multiple interfaces you may choose to multihome your server. This simply means each interface is on a different network. For example, eth0 is on the 192.168.0.0 network and eth1 is on the 192.168.1.0 network and wg0 (WireGuard VPN) is attached to 10.0.0.0. While it is unlikely there is a specific use case for game servers to use multiple networks you need to be aware of what IP addresses your server is bound to.

0.0.0.0

The 0.0.0.0 IP is a meta-address means non-specific or all addresses. When you set up a game server you may notice the IP address 0.0.0.0 in command line parameters and settings. It is the default IP for game servers just signifies that the game server can bind to all available server IP addresses.
Unless a specific IP address is required the game server IP can be set to 0.0.0.0.

Network Locations

Internet (Public)

If your server is hosted on the internet using a server provider you should have been allocated a public internet IP address that will be accessible by everyone on the internet.

Local Networks (Private)

Using a home server or virtual machine on your desktop is a great way to get started with LinuxGSM. However, a local network (LAN) may require a better understanding of networking, how local IP addressing works, and technologies such as DHCP and NAT.
When a server is hosted on a local network it will be given a private IP address that is only accessible to other devices on your local network. This is fine if you want to get friends around host a game server for a good old-fashioned LAN party. But if you want to allow online players access to your local game server you will need to configure your home router's firewall and setup port forwarding using NAT.

Tunneling

A relatively new technology is starting be become popular that allows applications hosted (think self-hosted web applications) on a private network to be accessed on the internet via a network "tunnel". This typically involves running a tunnel client in the private network that points to a specific internal IP and port. This bypasses the need to port forward on a router. Currently, there is a service called playit.gg that is specifically designed for game servers. However other solutions may work.

How LinuxGSM handles IP addresses

By default, LinuxGSM will use the 0.0.0.0 meta-address. This behavior will allow the game server to bind to all interfaces and allow LinuxGSM to query all available IP addresses. If there are multiple IP addresses available, details will display 0.0.0.0.
Internet IP: LinuxGSM will try to gather the server internet IP address to be shown in details.
Specific IP: If a specific IP address needs to be set it can be done using the ip setting in the LinuxGSM or game server config files.
Display IP: If you want to change the IP address displayed in alerts you can use the displayip.

Last modified 23d ago