Zeitzone setzen, ansonsten hat der MSSQL Server Probleme mit JTL Worker Einträge die verzögert ausgeführt werden sollen.
sudo timedatectl set-timezone Europe/Berlin
apt update
apt upgrade
apt install software-properties-common
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
apt-get update
apt-get install -y mssql-server
/opt/mssql/bin/mssql-conf setup
systemctl status mssql-server.service
default Collation ändern:
sudo systemctl stop mssql-server
sudo /opt/mssql/bin/mssql-conf set-collation
Enter the collation: Latin1_General_CI_AS
Fali2ban:
nano /etc/fail2ban/jail.conf
den folgenden Inhalt hinzu
[mssqld]
enabled = true
logpath = /var/opt/mssql/log/errorlog
maxfailures = 10
findtime = 1200
bantime = 3600
filter = mssqld-auth
port = 1433
action = iptables-allports
backend=polling
Danach legen wir mit
/etc/fail2ban/filter.d/mssqld-auth.conf
eine neue Datei mit folgendem Inhalt
[INCLUDES]
before = common.conf
[Definition]
_daemon = mssqld
failregex = Login failed for user .* \[CLIENT: <HOST>\]
ignoreregex =
an und starten fail2ban neu
service fail2ban restart