Jump to content

So I am trying to run some games on a linux server, and getting nowhere with them and having some struggles.

 

I am using...

Ubuntu 20.04

8c16t amd cpu

64GB RAM

 

I have Craftopia up and running with no problems what so ever. Ports are good, ufw allow (port) is good, and friends can connect from whereever they may be.

But when I make a fresh Valheim, or 7 Days to die, I can get a complete fresh install on windows working no problem, but when I fire a fresh install up on Linux, for some reason it loads, and then never am able to connect. 

Link to comment
https://linustechtips.com/topic/1430115-port-forwarding-help-on-linux-maybe/
Share on other sites

Link to post
Share on other sites

13 hours ago, ZeusXI said:

My server is to host games

Okaaay...

Post the output of

sudo iptables --line-numbers -nvL ufw-user-input
sudo ip6tables --line-numbers -nvL ufw6-user-input

unless it matches the ports for the gameserver you are trying to run, then post the output of 

sudo ip route

instead.

Link to post
Share on other sites

7 hours ago, Ralphred said:

Okaaay...

Post the output of

sudo iptables --line-numbers -nvL ufw-user-input
sudo ip6tables --line-numbers -nvL ufw6-user-input

unless it matches the ports for the gameserver you are trying to run, then post the output of 

sudo ip route

instead.

image.thumb.png.ff89ea76b060f5e6b868dfca16a215de.png

 

 

image.thumb.png.1170bad5fb94527a478257f183d00e64.png

Link to post
Share on other sites

There is stuff missing from the config for Valheim.

Create the file /etc/ufw/applications.d/valheim-server and add the following:

[valheim-server]
title=valheim-server
description=Valheim server listening port config
ports=2456:2457,4380,27000:27031,27036/udp|2456:2457,27015:27030,27036:27037/tcp

and activate it with

ufw app update valheim-server
ufw allow valheim-server

 

To deactivate use

ufw status numbered

to get its rule index numbers, then

ufw delete <high index number>
ufw delete <low index number>

 

If you wanted to include the "open ports" and "close ports" commands in your startup/shutdown script for the server you can use 

for rule in $(ufw status numbered|awk '/valheim-server/'|sed 's/\[ \?\([0-9]*\)\].*/\1/'|sort -r);do ufw --force delete ${rule};done

  on the shutdown side.

 

You'll need to make a /etc/ufw/applications.d/7days2die-server file too, post it here if you want it checked, but valheim is more complicated so you should be fine with syntax.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×