Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
Ivan Connor

Debian 11 - DayZ Server Install - Quick guide

Recommended Posts

Posted (edited)

LINUX Debian 11 INSTALL NEW DayZ SERVER.
--
LOCALE & TIMEZONE:
sudo apt install locales-all
 --choose en_US!
sudo dpkg-reconfigure locales
locale-gen en_US
update-locale
  --choose your TIMEZONE!
timedatectl set-timezone Europe/Berlin
--
CREATE USER:
useradd -m dayzserver
--
SOFTWARE SETUP & STEAMCMD:
sudo apt-get install lib32gcc-s1
su - dayzserver
mkdir -p ~/servers/steamcmd && cd ~/servers/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
--
DAYZ SERVER SETUP:
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login YOURUSER +app_update 223350 +quit

-- You will need your Steam Code now if 2FA is active, to finish the DayZ Server setup

Edited by Ivan Connor
Q&D

Share this post


Link to post
Share on other sites
Posted (edited)

Because of constant attacks on sshd the tcp/ip substack is doing things it shouldn't do.

To minimize this and possibly gain 20-30ms better ping times one can use fail2ban to recognize and prevent these attacks.

fail2ban will monitor attacks on sshd and "jail" the perpetators. However, if you lock yourself out because of a mistake you're in trouble, so beware.
--
To install fail2ban :
sudo apt install fail2ban
--
Edit the jail.conf:
vi /etc/fail2ban/jail.conf
__
The value we have to set here is :
[sshd]
enabled = true
__
The other values I set/check here is:
# "bantime" is the number of seconds that a host is banned.
bantime  = 28d

# A host is banned if it has generated "maxretry" during the last "findtime"
# seconds.
findtime  = 10m

# "maxretry" is the number of failures before a host get banned.
maxretry = 3

Note : A permanent bantime of -1 will overload the tcp/ip stack at some point

__

Restart fail2ban:
sudo systemctl restart fail2ban.service
__

Check activity of fail2ban:
journalctl -f

__

Warning: In case you get locked out of your server's sshd you will need access to a web console or a second admin to unban you. Make sure your server provider has the ability to access server console via web.

The command to unban your IP in a case of mistake is as follows:
fail2ban-client set sshd unbanip xxx.xxx.xxx.xxx

Hint: With the fasil2ban settings above you could wait 10 min. before using your last try to later try again.
__

Note:  As a general rule for security, root login should always be disabled in sshd. Logins should be done with less privileged users, like in this case "dayzserver". The command "su - root" makes changing the user afterwards easy.
__


Disclaimer: I am not a Linux admin, I configure things just the way they work for the stuff I need. And I always appreciate more and better info. Cheers.

Edited by Ivan Connor

Share this post


Link to post
Share on other sites
Sign in to follow this  

×