Jump to content

[CentOS 7][64bit]VPS Zomboid Server Setup Guide.


relin

Recommended Posts

Table of Contents:

Click the links below to quickly navigate to sections you need.

1. Foreword">Foreword

2. Preparation">prep


 

1. Foreword:

This an installation guide is for beginner-intermediate users, steps are mostly in detailed explanations. If you just got SSH capabilities, a terminal on putty, and centos 7 on a vps/dedi provider, this is for you.

 

Read carefully and make informed decisions via copy and paste. I am not responsible if you brick your server, if you're unsure, google first.

 

VPS and 64bit dictates the tested environment, while providers of your server can be different from mine, centOS 7 is able to reliably run a project zomboid using the steps provided. If your CentOS is older/newer, tweak are needed for repositories, and libraries. Checks and options for the variations of CentOS are provided, but this guide does not derail into helping 32bit and dedicated server users, hopefully this helps you.

 

Side Note (I excluded firewallD and replaced it with good ol' iptables):

This entire guide ignores CentOS 7 firewallD and uses the old iptables for firewall options. because botnets were brute forcing SSH port on day 0, while I was newly acquaintenced to CentOS 7, I didn't have time to learn, so I used what I knew, iptables, with fail2ban. If you can help harden this in more native CentOS 7 options with fail2ban and firewallD, feel free to add your input.

 

Editor's Note:
[2/19] Going to format this better tomorrow, it's completed but not looking too pretty.

[2/22] Update: Proof read and All steps recently tested and working on another dedicated server I'm running.

[~~~~] ToDo: Append more zomboid server settings and server tools in the future.

 


 

2. Preparation:

 

CTRL+C on windows and right click in a putty terminal to paste.

 

Codes will be in boxes like these:

EXAMPLE: DOUBLE CLICK SELECT AND COPY ME# These are comments, no need to copy


 

Updates and checks are needed.

 

Ingredients: Putty, your port 22 access, root and your password, and a centos7 server.

 

What now?

 

Log into your root account.
 
Check for 64bit CentOS:

uname -a

You should see "x86_64 x86_64 x86_64" at the end of line, congratulations, you're 64bit. If you're 32bit, the installation process will be a lot easier. Due to you not needing to install both 32bit libraries and 64bit ones to make zomboid work.
 
To make sure you're root:

whoami

you should see "root" at the next returned line after you enter this command.
 
 
Update repolist for yum:

yum update 

Afterwards, to see what repos you have available:

yum repolist

To check if you have RHEL 7 - RPMforge.net for java, and htop.
 
This step is for those that do not have RHEL 7 rpmforge on their yum repolist:

yum install yum-utils

(wget in a folder if you want organized downloaded files)

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt
rpm -i rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

To delete these setup files:

rm -f RPM-GPG-KEY.dag.txtrm -f rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

To check for GPG keys:

rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE} \n %{SUMMARY} \n" gpg-pubkey

To check yum if you have RHEL 7 on the list

yum repolist##And if you don't have RHEL 7: yum-config-manager --enable rpmforge 
 


 

3. Setting up iptables as firewall:

I had to prevent botnet attacks on day 0, didn't really get to learn firewallD/firewall-cmd, if you know a better process for this, please append your revision below. You might already have these services on your VPS/Dedi, it doesn't hurt to run yum install, because it updates the services if you already have it, and it will do nothing if you're already up-to date.

yum install iptablesyum install iptables-services

Did it come with a firewallD?

systemctl status firewalldsystemctl status firewall-cmd

firewallD is on, disable it

systemctl mask firewalldsystemctl start iptablessystemctl stop firewalldsystemctl enable iptables

no firewallD, it's off (skip this if you went through 4 lines above that disabled firewallD, it just repeats starting iptables.)

systemctl start iptablessystemctl enable iptables

start gets it running,

enable gets it running after your VPS restarts (hopefully never).

 

IMPORTANT

[sSH] If you do not include this line you will be locked out of your server.

iptables -I INPUT 1 -p tcp --dport 22 -m --state NEW -j ACCEPT#22 is not your ssh port? change accordingly.

(Got locked out twice while I was trying to edit iptables on a dedicated server :P, no judging)

 

Fail2ban is a quick and easy way of filtering out unwanted login entries from ssh

I had security problems on my VPS, so I used it and it works.

 

The latest version of fail2ban is on EPEL, you need to install the repository for it:

yum install epel-release
yum install fail2ban

Edit with your favourite text editor vi, nano or vim, I chose vim.

yum install vim
vim /etc/fail2ban/jail.local

Append the following to the empty file, bantime is in seconds, equals to 24 hours. If within 10 minutes, 10 entires were placed, they would be banned for a day, via the firewall settings of iptables set in jail.conf (default setting, where it inherits modifications of jail.local)

[sshd]enabled = truebantime = 86400findtime = 600maxentry = 10action = iptables[name=SSH, port=ssh, protocol=tcp]

 
Editing with Vim:
 


 
To edit/type into the file hit insert key.

[Ins] #Hit the (Insert) key on your keyboard

Navigate with your arrow keys, of your typing curser to the place you want to type, edit like a text file on windows, just backspace to delete, etc.,

When you're done editing. Hit

[Esc] #escape key top left of keyboard to exit out of edit mode from [Ins]

After you finished with the values you'd like, hit [shift] + [;] (semi colon), then type wq and enter.

:wq


 
3.1 [important] Opening ports on iptables for your zomboid server:

iptables -I INPUT 1 -p tcp -m tcp --dport 16261:XXXXX -j ACCEPTiptables -I INPUT 2 -p udp -m udp --dport 16261:XXXXX -j ACCEPT#UDP and TCP are needed#Replace Xs with additional users to 16261#XXXXX = 16261 + (player capacity)

The Xs stands for the amount of users you want added to 16261, the range is dictated by the colon operator, where numbers left to right are inclusive. As in 1:3 is 1, 2 and 3. I read from somewhere that 2GB ram is equivalent to 10-15 players. You can do this later if you want, it's always changeable. My personal experience on a OpenVZ Linux 2GB VPS is that 2GB RAM handles 5 - 7 users smoothly with single player zombie settings.
 
Removing iptables Rules [to refine your open port/mistakes]

The oh no, I miscalculated amount of users I can handle, I can have more, or less. Delete old rules set above by...

#To check rulesiptables -L INPUT -n --line-numbers#To delete rulesiptables -D INPUT <NUMBER_FROM_LINE_HERE>

First line is to acquire a list of rules you've set on iptables.

Second line is to remove it via the annotated line#Number dictated by the first command, you don't need the square bracket.

Warning: Rule number on list is concatenated, not static. If you delete rule 2, rule 3 is now rule 2. Re type rule check command every time you want to delete, I locked myself out by deleting the SSH port two times too many.

 

Saving iptable Changes

service iptables save

You thought service was replaced by systemctl? lol not quite.
 
Wrapping fail2ban around iptables
 
Check if you have fail2ban running after installation:

systemctl status fail2ban

If it's not running:

systemctl start fail2ban

And enabling it starts it at every restart.

systemctl enable fail2ban

 
Congrats! You're done with basic firewall settings. (clyde)
 


 

4. Getting steamcmd for zomboid server files:

 
steamcmd is a script that helps you validate and obtain project zomboid server files and other steam supported games..
 
Install java and the libraries for glibc in 32bit form.

yum install javayum install glibc.i686 libstdc++.i686

because zomboid is 32bit, and your server is 64bit centOS, it requires 32 bit library to run a 32 bit game.
 
Other libraries ([verified not needed] optional):
 
The following should give you whatever resources it needs to run the zomboid dedicated server shell script properly as I have installed this out of fear that it would throw exceptions. I hope you wouldn't need the extra step, if you like to do a test, this is the step you don't include, and then include if the shell script terminal throws a bunch of exceptions during initialization.
 
This is usually for when you get some obscure exception thrown at your zomboid console that is not normal.

yum install libstdc++.x86_64 glibc.x86_64 glibc-common glibc-devel glibc-headers

concatenated version of the updated code from this op, in addition to the 64 bit versions of the previous glibc libraries.
 
Adding steam user to run zomboid scripts
It's recommended you use a separate user when running the zomboid server and steamcmd, out of security reasons that root shouldn't be logged in at all times.

adduser steamuserpasswd steamuser#<type steamuser's password>

 
Then you want to add the user to the group for using admin commands, called wheel.
 
But before that, you want to check if this is allowed in the first place.
 

visudo

Scroll down using arrow keys to find this line
 

## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL

 
(make sure %wheel ALL(ALL) ALL is not commented out), it should look like the above.
 
How to use vi to edit? (it's very similar to vim)

Hit

i

to insert/write, use as if normal word document, delete with backspace, etc.,

 

When you're done

esc

to exit out of insert (edit mode)

 

To save type the following, note it's colon, that requires shift + semi colon

:wq

To exit

:q

To ignore edit

:q! 

Hit enter afterwards to exit after you typed either ":q" ":q!" or ":wq"


 

Adding steamuser to wheel group

usermod -aG wheel steamuser

Switch User to steamuser

su steamuser

Check which group you're in by typing

groups

whoami is just an empty command to test sudo on.

sudo whoami

your sudo password is that which you set for steamuser, not root.

exit#this exits your su steamuser session, not putty terminal for your ssh session.

It will return to [root @ yourserver]

 

Making directory for steamcmd
navigate to your folder of choice, for the purpose of defaulting a location for the guide, I chose /home/steamuser/ to install steamcmd and project zomboid under.

mkdir /home/steamuser/steamcmd#makes directory aka folder called steamcmd
cd /home/steamuser/steamcmd#goes to directory aka folder called steamcmd
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz#gets the file from the web, provided by valve.
tar -xvzf steamcmd_linux.tar.gz#unzips the file
rm -f steamcmd_linux.tar.gz#remove unnecessary install files -f ignores prompted warnings and force yes
./steamcmd.sh#runs script, a terminal appearing notifying you with...#Steam>

You are now in the terminal of steamcmd.sh, type the line below, replace brackets with your account info.
Make sure you have project zomboid on this account or else you wouldn't be able to download the dedicated server files, and be aware, password is visible, so watch your back :o

login <STEAM:USERNAME> <STEAM:PASSWORD>

You will be prompted with steamguard verification, yes this is everytime you want to run an update on project_zomboid from steam, fetch and type it from your email, hit enter, after login is confirmed. If you've mistaken your steamguard key, and the steamcmd terminal didn't kick you, type "quit" hit enter, repeat ./steamcmd.sh again and redo from the login.

force_install_dir /<ANYWHERE>/

/<ANYWHERE>/ is a folder soon to be created within /steamcmd/, and it will hold the zomboid server files, to everytime you want to launch you have to visit and type it, i named it /server/. All immediate zomboid server launch options will be allocated within home/steamuser/server after you type this command in the steamcmd terminal:

app_update 108600 -beta onlinetest validate

The above line is from the wiki, last revision in 2014, still worked for my setup.

 

app_update is a cheap term for, install if you don't have, update if you do.
108600 is the ID for the steam game, project zomboid.
beta opts-in the latest version

onlinetest is maybe an id identifer for it (optional??? if someone wants to exclude for a test, results would be appreciated)
Validate is just a check to confirm you didn't download a car, cause it's illegal you know.

quit

This exits steamcmd terminal
 


 

5. Zomboid server files and settings:

 

Preparing for your zomboid server launch.

you are in your /home/steamuser/steamcmd folder

cd server#or whatever folder you force_install_dir into

List the items under this folder with:

ls 

You better see 'projectzomboid-dedi-server.sh'  in there.
 

Allocating RAM:

We're going to edit RAM values allowed by the script to run your zomboid server.

vim projectzomboid-dedi-server.sh

Edit these values with vim:

   -Xms4096m \   -Xmx4096m \

Change to your ram's capabilities.
 
Generally RAM:
1GB = 1024,
2GB = 2048, etc.,
Connal referenced Kirrus on this thread, noting to not place it over 80% of your VM's capacity, that means your VPS.
 

What is Xmx and Xms?

heap size allocation (what is xmx/xms) (Minecraft ram allocation)

because minecraft runs in a similar setting in java as to this game, it's useful to see how other server hosts allocate RAM.

 

How do you use vim again? (Smash spoiler button with hammer to find out)

Spoiler
[Ins] #Hit the (Insert) key on your keyboard

Navigate your cursor to the place you want to replace, edit like a text file on windows, just backspace to delete, etc.,
 
When you're done editing. Hit

[Esc] #escape key top left of keyboard to exit out of edit mode from [Ins]

After you finished with the values you'd like, hit [shift] + [;] (semi colon), then type wq and enter to save and quit.

:wq

Using "screen" for multiple tabs in your window.

Now we install screen to allow multiple instances of tabs/windows running in your VPS.

yum install screenscreen[CTRL] + a , [c]   #you actually have to hold Ctrl + a, release both, then hit c

What screen allows is multiple instances of "tabs" on your one SSH window.
To use it just [CTRL] + a, [c]
to create a new instance of that tab.
Then [CTRL] + a, [n/p]
(n or p, to navigate next or previous tabs)
and [CTRL] + a, [k] kills the process. (closes the tab)
 
Additional info on "screen"

 

If you see

[screen terminated]

immediately when SSH login is steamuser, click on spoiler to fix.

sudo mount -o remount,gid=5,mode=620 /dev/pts

Source and alternative fix. Additional info in spoiler tag if you want to know why this is.

 

Source

 

The user running screen needs access permissions to the /dev/pts of the console he is working on.

If you log into a console as root and later su into a normal account, you normally will lose access permissions to the pts you are working on.

As the normal user, please run ps and have a look at the second field (TTY) of your processes. It should read "pts/N" (N being a number). Then, do ls -l /dev/pts/N and verify whether the normal user has access to that file.

If he has no access, you might consider widening the access permissions of the /dev/pts/N (i.e. with the account that logged into the console). As voretaq7 points out, please keep in mind the security implications of this: The permissions are set up that way for a reason.

 

First time running Zomboid Server

 

After you're acquainted with windowed navigation with screen. Launch your server

./projectzomboid-dedi-server.sh

For the first time it'll prompt you with an admin password, and another prompt to confirm what you entered.
 
Wait for it to load.
 
when you see..
 

*** SERVER STARTED ****
server is listening on port 16261

 
You're golden. You shouldn't see more lines after server is listening on port, unless you felt a bit hastey and joined it.

quit

To exit out of the server in order to change settings.

 

5.1 Editing more server settings

 

Now you want to start another screen to visit the server settings.

[CTRL] + a, n  #you actually have to hold Ctrl + a, release both keys, then hit n

Will bring you back to the next screen, (you have two screens, we're navigating this one to another location), use it as much as you like, it cycles.

vim /root/Zomboid/Server/servertest.ini

To edit values such as public, pvp, maxplayers, etc., Below are the values I really tweaked from default.
 

How do I use vim to edit again?
 

[Ins] #Hit the (Insert) key on your keyboard

Navigate your cursor to the place you want to replace, edit like a text file on windows, just backspace to delete, etc.,
 
When you're done editing. Hit

[Esc] #escape key top left of keyboard to exit out of edit mode from [Ins]

After you finished with the values you'd like, hit [shift] + [;] (semi colon), then type wq and enter.

:wq


 
Settings I changed:

PVP=falsePauseEmpty=truePublic=truePublicName=[CENTOS]TESTINGPublicDescription=TESTING 1 2 3MaxPlayers=15

Remember 2GB = ~10-15 players, RAM wise, scale accordingly, and make sure to delete old iptables and reopen ports according to change.
 
After that is done, you can safely restart your server.

su steamuser
sudo ./projectzomboid-dedi-server.sh

#note if sudo every prompts you of a password, it's always the password of that user you're on.

 

Server should launch, and you and others should be able to join.

 

Just know you have screen options, every time you close putty or whatever program you use to gain access to your SSH. You will have the option to resume with

screen -r

To switch, just use: CTRL+a, then n. Provided you have two screens, navigates you out of the running server for you to do other server stuff.

 

If you have only one screen, CTRL+a, then c to create a new.

 

5.2  Server Difficulty Tweaks:

 

Luckily you're given a tool to create this file yourself.

 

it's located on your steam copy of zomboid folder on windows

CXYZ:\Program Files\Steam\SteamApps\common\ProjectZomboid

The file name of

PZServerSettings.exe 

It's a GUI guided editor that automatically creates the file named

servertest_SandboxVars.lua

for your server location of..

C:\Users\YOURNAME\Zomboid\Server

For your VPS it must be placed on

/root/Zomboid/Server

if only you had winscp or an equivalent program to run the .exe file within the vps.

 

Fear not you can just create "servertest_SandboxVars.lua" and paste the following inside.

 

 

This is directly copied from the .lua file created by running PZServerSettings.exe that accompanied project zomboid's steam directory.

Specifications of general settings is unique for my VPS, but the ZombieLore is left at the default setting. 

 

Tweak based on your experience in sandbox, or change things! 

 

I commented the representation of variables under worded settings for each variable in square brackets.

 

Note zero is not used, and it's mostly integer values.

SandboxVars ={	Zombies = 3,             --normal is at 3, ranges of insane to none [1-5]	Distribution = 1,        --no 0's as modifiers, urban focused is [1], the other option must be [2] for uniform	WaterShutModifier = 365, --in-game days until shutdown, this is an in-game year.	ElecShutModifier = 365,	Alarm = 3, 		 --never [1] "rare" as 3, to very often [6]	LockedHouses = 4,        --never [1] to very often [6]	FoodRotSpeed = 5,        --very fast [1] to very slow [5]	FridgeFactor = 5,        --very low [1] to very effective refridgeration [5]	LootRespawn = 5,         --from none, daily, weekly, monthly, to bi-monthly [5]	ZombieRespawn = 3,       --zombie respawn rate, none, everyday, every week [3], every month, every 2 months	TimeSinceApo = 1,        --I set this at 0 months since apocalypse, setting goes from 0 to 12.	Temperature = 3,         --temperature from very cold to very hot, [3] at normal	Rain = 3,                --rain from dry to very rainy, [3] at normal	ErosionSpeed = 3,        --veryfast (20 days), fast (50), [3] normal (100), slow (200), very slow (500)	Farming = 1,             --[1]veryfast, fast, normal[3], slow, veryslow	NatureAbundance = 3,     --very poor, poor, normal, abundant, very abundant	FoodLoot = 4,            --extremly rare, rare, normal, [4] common, abundant	WeaponLoot = 3,          --extremly rare, rare, [3] normal, common, abundant	OtherLoot = 3,	         --extremly rare, rare, [3] normal, common, abundant	XpMultiplier = 1,        --seems like decimal point can be used ie 1.3 6.9	StatsDecrease = 3,       --very fast, fast, [3] normal, slow, very slow	DayLength = 3,           --[1]15min, 30min, [3]1hr, 2hr, 3hr, 4hr, 5hr, 12hr, [9]realtime	StartMonth = 7,          --[1]january --- [12] december	StartTime = 2,           --[1]7am, [2]9am, 12pm, 2pm, 5pm, 9pm, 12am, 2am, [9]5am	ZombieLore =	{		             --these are the default 'proper zombies' setting		Speed = 3,           --sprinters, fast shamblers, [3]shamblers 		Strength = 2,        --superhuman, human, weak		Toughness = 2,       --tough, [2]normal, fragile		Transmission = 1,    --[1]blood+saliva, everyone is infected, none		Mortality = 5,       -- [1]instant, 0-30 sec, 0-1 min, 0-12 hr, [5]2-3 days, [6]1-2 weeks		Reanimate = 3,       -- instant, 0-30sec, [3]0-1min, 0-12 hrs, 2-3 days, 1-2 weeks		Cognition = 3,       -- navigate+use doors, navigate, [3]basic navigation		Memory = 2,          -- long, [2] normal, short, none		Decomp = 1,          -- [1] slow + weakens, slows, weakens, no effect		Sight = 2,           -- eagle-eyed, [2]normal, poor		Hearing = 2,         -- pinpoint, [2]normal, poor		Smell = 2,           -- bloodhound, [2]normal, poor	}} 

How do you create servertest_SandboxVars.lua with vim?

cd /root/Zomboid/Servervim servertest_SandboxVars.lua

then paste it line by line, remember right click is paste in terminal.

 

or you can upload this to a website like pastebin, then download it as a text file and renaming it via..

cd /root/Zomboid/Serverwget http://pastebin.com/download.php?i=pFZyxt3Amv download.php?i=pFZyxt3A servertest_SandboxVars.lua

example file used is my uploaded version of servertest_SandboxVars.lua, reference above. If you do exactly that, in 3 lines it'll work as intended for your server, modify it to your liking afterwards with vim or nano. Enjoy your server!

 

 
 


 

6. Optional server monitoring tools:

(more to be added)

 

Install htop via

yum install htophtop

it's like task manager for windows, but in a terminal, you can end trees of processes.

 


 

7. Common launch Exceptions (if you see these while initialising you shouldn't worry)
 
I see these two common exceptions being handled gracefully, meaning the server still runs. If you have other common launch exceptions, just paste below and I'll append it. I saw these two on my first installation of zomboid, still experimenting with my VPS. On my 3rd installation on a dedicated server, I didn't see the public server one thrown.
 
During initialising phase of server system:

"failed to parse Recipes..."

 

Initialising Server Systems...
translator: language is EN
translator: failed to parse Recipes for language=EN
translator: failed to parse Items for language=EN
...
...several lines later

...
ScavengDefinitions: no such item Base.BerryBlack
ScavengDefinitions: no such item Base.BerryBlue
ScavengDefinitions: no such item Base.BerryPoisonIvy
ScavengDefinitions: no such item Base.BerryGeneric1
ScavengDefinitions: no such item Base.BerryGeneric2
ScavengDefinitions: no such item Base.BerryGeneric3
ScavengDefinitions: no such item Base.BerryGeneric4
ScavengDefinitions: no such item Base.BerryGeneric5
ScavengDefinitions: no such item Base.MushroomGeneric1
ScavengDefinitions: no such item Base.MushroomGeneric2
ScavengDefinitions: no such item Base.MushroomGeneric3
ScavengDefinitions: no such item Base.MushroomGeneric4
ScavengDefinitions: no such item Base.MushroomGeneric5
ScavengDefinitions: no such item Base.MushroomGeneric6
ScavengDefinitions: no such item Base.MushroomGeneric7
ScavengDefinitions: no such item Base.Cricket
ScavengDefinitions: no such item Base.Grasshopper
ScavengDefinitions: no such item Base.Cockroach
ScavengDefinitions: no such item Base.Worm
ScavengDefinitions: no such item Base.GrapeLeaves
ScavengDefinitions: no such item Base.Rosehips
ScavengDefinitions: no such item Base.Violets
ScavengDefinitions: no such item Base.WildEggs

 

When public server is set.

you see java.lang.NullPointerException

 

*** SERVER STARTED ****
server is listening on port 16261
connecting to public server list
java.lang.NullPointerException
        at zombie.util.PublicServerUtil.getMacAddress(PublicServerUtil.java:183)
        at zombie.util.PublicServerUtil.insertDatas(PublicServerUtil.java:144)
        at zombie.util.PublicServerUtil.insertOrUpdate(PublicServerUtil.java:93)
        at zombie.network.GameServer.main(GameServer.java:325)

 


 

iptables, the perfect setting (guide in progress)

 

Aiming for security and ability to connect players, and public server list, without using no firewall at all.

 

 

Check iptables:

iptables -L

Does it look like this?

 

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

ACCEPT     tcp  --  anywhere             anywhere             tcp dpts:16261:16276

ACCEPT     udp --  anywhere             anywhere            udp dpts:16261:16276
f2b-SSH    tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:ssh
REJECT       all  --  anywhere             anywhere          reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

iptables is very logical in its setup, almost too much, where orders matter from top to bottom.

The Green and Red are establishing new rules to connection types below it.

 

The bold black rules for udp and tcp is what your server needs for zomboid to accept connections

 

The bolded REJECT is what you want to add SSH access to, before it. See

 

The OUTPUT policy needs to be just that, I'm only using this as a gaming server, and I trust myself and zomboid devs I don't see the need to filter my own server's output. If it's not on ACCEPT, use the following line below.

iptables -P OUTPUT ACCEPT#accepts all outward going packets. Because it's your server sending files.

We're a server, so we need to accept input, but filter it. If for some reason it's not on ACCEPT.

iptables -P INPUT ACCEPT
Link to comment
Share on other sites

  • 5 months later...

Great guide! I managed to make my own server easily even tho I'm a complete beginner with linux's shell.

 

About the line to download the game through steam, the "onlinetest" option refers to the -beta one, it was the code to use the beta version with online mode enabled, you can use the new "iaccepttheconsequences" now.

Link to comment
Share on other sites

  • 2 months later...

Great write up, thanks for taking the time.  One note on:

 

 

 

Make sure you have project zomboid on this account or else you wouldn't be able to download the dedicated server files, and be aware, password is visible, so watch your back

 

Not only watch your back, but remove this from your shell history.

 

Having it there is even worse, especially if anyone else has access to this machine with our without root.  Shell history is typically the first place you look for goodies if you've compromised a box or are in the mood to be a dick.

Link to comment
Share on other sites

  • 1 year later...

this is why most games let you install the server anonymously. so dumb PZ makes you login. it s not like they support the server install, so why do i gotta use my paid account to run it?  

 

I got on here to tell anyone that this is way out of date on the PZ serverside...

 

projectzomboid-dedi-server.sh

does not exist anymore. it changed names. there is no documentation from this vapor company with this information. I figured out how to get it to run, but i am not going to write it up, because i cant get it to be "steam-enabled" which makes it useless to me, and most of you.

 

the way you start the server now, i THINK, is tho =find and run server_start.sh but it doesnt steam enable it like the above file is supposed to. caus eya know a million old guides and people , from the indie stone, saying this suchandsuch guide is old and has changed look here , AT ANOTHER OUTDATED GUIDE.....

 

again, for steamCMD, through linux, the server package doesnt contain projectzomboid-dedi-server.sh, even though the windows server files include this.

 

i think if i wanna waste server resources and run x with full graphical steam, but after many many after hours, i give up and will run no server. I already told my circle of friends we will have no server. i guess ill run a minecraft or starbound server...

 

 

 

Link to comment
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
×
×
  • Create New...