Grundlegende Sicherheit auf einem Linux-Server
- By : CM
- Category : Linux, Sicherheit, vServer

Hier in diesem Anleitung zeigen wir Ihnen, wie Sie einige grundlegende Sicherheits Konfigurationen
auf dem Server vornehmen können, damit er etwas sicherer gegen Hacker ist.
In diesem Beispiel verwenden wir einen neu installierten “Ubuntu 16.04 – Plesk Onyx” vServer M8,
um ihn zu präsentieren und zu testen.
1. Stellen Sie sicher, dass der Server auf dem neuesten Stand ist.
(dies ist etwas, was Sie regelmäßig auf dem Server tun sollten, damit die neuesten Sicherheitspatches etc. installiert werden).
Code:
1 |
apt-get update && apt-get dist-upgrade |
2. Login über SSH-Schlüssel konfigurieren und Passwort-Anmeldung deaktivieren
Folgen Sie dazu unserem Leitfaden hier:
https://www.server4you.com/community/forum/operating-systems/debian/1783-how-to-setup-ssh-key
3. Anlegen eines neuen Nicht-Root-Benutzers
(Sie können diesen Benutzer zur sudo-Liste “usermod -aG sudo <benutzername>”
als Root-Benutzer hinzufügen, oder einfach “su root”, wenn nötig.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# adduser community Adding user `community' ... Adding new group `community' (1010) ... Adding new user `community' (1000) with group `community' ... Creating home directory `/home/community' ... Copying files from `/etc/skel' ... Enter new password: Retype new password: passwd: password updated successfully Changing the user information for community Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y |
Fügen Sie dort auch einen SSH-Schlüssel für die Anmeldung hinzu.
1 2 3 4 5 |
su <username> mkdir /home/<username>/.ssh/ chmod 700 /home/<username>/.ssh/ nano /home/<username>/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys |
Testen Sie, ob Sie sich mit den neuen Benutzer einloggen können.
4. Konfigurieren Sie die sshd_config
(SSH-Port ändern / Root-Login deaktivieren).
Ändern Sie dort den SSH-Port (wenn Sie bereits eine Firewall konfiguriert haben, vergessen Sie nicht, die Verbindung auf dem neuen Port zuzulassen)
und deaktivieren Sie die Root-Anmeldung.
1 |
nano /etc/ssh/sshd_config |
Ändern Sie dort “Port 22” auf die gewünschte Port-Nummer, in diesem Beispiel werde ich 1923 verwenden.
Unsere SSHD_CONFIG sieht nun so aus:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# cat /etc/ssh/sshd_config # Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 1923 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 1024 # Logging SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 120 PermitRootLogin no StrictModes yes RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile %h/.ssh/authorized_keys # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no # Change to no to disable tunnelled clear text passwords PasswordAuthentication no # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM yes |
5a. grundlegende Konfiguration der Firewall über UFW (unkomplizierte Firewall)
Beachten Sie, dass es auf den vServern eine Grenze für die Regeln gibt, die Sie festlegen können.
Sie können überprüfen, wie viele Sie verwenden und wie viele Sie einstellen können mit:
cat /proc/user_beancounters | grep numiptent
Beispiel:
# cat /proc/user_beancounters | grep -iE “numiptent|uid”
uid resource held maxheld barrier limit failcnt
numiptent 173 177 256 256 256
Wie Sie sehen können, verwende ich 173 und ich darf maximal 256
unter https://hilfe-server.de/server4you-vserver-resourcenlimits/ finden Sie ein resource übersicht für Ihr vServer type.
UFW installieren
1 |
apt install ufw |
Da wir kein IPv6 haben, können wir es deaktivieren.
1 |
nano /etc/default/ufw |
und ändern Sie “IPV6=ja” in “IPV6=nein”.
Fügen Sie die Regeln hinzu:
1 |
ufw allow 1923 |
Ändern Sie diese in die Portnummer, die Sie für SSH verwenden.
ufw allow 22 -> für das gefälschte SSH
Fügen Sie alle Ports hinzu, die Sie verwenden
Wenn Sie sicher sind, dass der SSH-Port erlaubt ist, dann wird er ausgeführt.
(mit “ufw show added” können Sie alle Regeln überprüfen, die hinzugefügt werden sollen”.
Beispiel:
# ufw show added
Added user rules (see ‘ufw status’ for running firewall):
ufw allow 1923
ufw allow 22
ufw allow 21
ufw allow 8443
ufw allow 80
ufw allow 443
ufw allow Postfix)
um die Firewall zu starten und die Regeln zu aktualisieren:
Bitte vergessen Sie nicht, dass die Firewall-Konfiguration von Ihren Bedürfnissen und Ihrer Konfiguration abhängt,
so dass die Regeln und Ports entsprechend Ihrem Server geändert werden müssen!
Das blinde Ausführen dieser Funktion kann zum Verlust der Verbindung zum Server führen.
Hierfür übernehmen wir keine Haftung.
Sie können die Konfiguration auch über IPTables vornehmen.
Hier in diesem Beispiel werden wir den gesamten eingehenden Verkehr blockieren und nur denjenigen zulassen, den wir wollen.
Vergessen Sie nicht, Ihren SSH-Port so einzustellen, dass er zuerst ankommt, bevor Sie die Drop-Richtlinie festlegen!
Um alle Ihre Regeln zu überprüfen, können Sie den Befehl “iptables -L” verwenden.
Hier sehen Sie, dass es im Moment keine Regeln gibt und die Vorgehensweise ist, alles zu akzeptieren:
1 2 3 4 5 6 7 8 9 |
# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
Auch als externe Prüfung haben wir vor dem Setup einen Port-Scan durchgeführt:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
$ nmap <Your IP or Hostname> -PN -p1-10000 Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-23 08:05 CET Nmap scan report for euve183269.serverprofi24.de (62.75.138.43) Host is up (0.0073s latency). Not shown: 9984 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 53/tcp open domain 80/tcp open http 106/tcp open pop3pw 110/tcp open pop3 143/tcp open imap 443/tcp open https 465/tcp open smtps 993/tcp open imaps 995/tcp open pop3s 1923/tcp open unknown 4190/tcp open sieve 8443/tcp open https-alt 8880/tcp open cddbp-alt Nmap done: 1 IP address (1 host up) scanned in 0.74 seconds |
Wie oben beschrieben, werden wir unsere SSH-Port so einstellen, dass er die Verbindungen akzeptiert:
1 |
iptables -A INPUT -p tcp --dport 1923 -j ACCEPT |
Ändern Sie den 1923 auf den Port, an dem Ihr SSH aktiv ist.
1 |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT |
Dies erlaubt Verbindungen zu Port 22, wo ich das gefälschte SSH in Schritt 6 einrichten werde.
1 2 3 |
iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT iptables -A INPUT -p tcp --dport 8443 -j ACCEPT |
Hier habe ich nun den Zugriff auf den Webserver und Plesk erlaubt.
1 |
iptables -A INPUT -i lo -j ACCEPT |
Hier erlauben wir die Loopback-Verbindungen, damit wir keine Probleme mit einigen Diensten etc. bekommen.
Nun, da wir unsere SSH erlaubt haben, können wir die regel ändern, um sie verwerfen zu lassen:
1 |
sudo iptables -P INPUT DROP |
Dies führt nun dazu, dass alle eingehenden Verbindungen, bei denen keine Zulassungsregel angegeben ist, abgelehnt werden.
Jetzt überprüfen wir noch einmal mit iptables -L
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# iptables -L Chain INPUT (policy DROP) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:1923 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere tcp dpt:8443 ACCEPT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
Wie Sie “Chain INPUT (policy DROP)” sehen können, ist die Voreinstellung so eingestellt, dass alle Eingaben/Eingaben abgelehnt werden.
Und die anderen Regeln, um die Verbindung zu akzeptieren.
Wir können das mit einem neuen Port-Scan überprüfen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ nmap 62.75.138.43 -PN -p1-10000 Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-23 08:16 CET Nmap scan report for euve183269.serverprofi24.de (62.75.138.43) Host is up (0.0075s latency). Not shown: 9995 filtered ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 1923/tcp open unknown 8443/tcp open https-alt Nmap done: 1 IP address (1 host up) scanned in 24.99 seconds |
Und ein zweiter Scan, der alle Ports überprüft, die beim ersten Scan geöffnet waren:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
$ nmap 62.75.138.43 -PN -p21,22,25,53,80,106,110,143,443,465,993,995,1923,4190,8443,8880 Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-23 08:18 CET Nmap scan report for euve183269.serverprofi24.de (62.75.138.43) Host is up (0.0075s latency). PORT STATE SERVICE 21/tcp filtered ftp 22/tcp open ssh 25/tcp filtered smtp 53/tcp filtered domain 80/tcp open http 106/tcp filtered pop3pw 110/tcp filtered pop3 143/tcp filtered imap 443/tcp open https 465/tcp filtered smtps 993/tcp filtered imaps 995/tcp filtered pop3s 1923/tcp open unknown 4190/tcp filtered sieve 8443/tcp open https-alt 8880/tcp filtered cddbp-alt Nmap done: 1 IP address (1 host up) scanned in 1.26 seconds |
Wie Sie sehen, werden alle Ports, die wir in den IPTables nicht angegeben haben, gefiltert (die Verbindung wird nicht akzeptiert).
Seien Sie bitte vorsichtig, wenn Sie diese Regeln festlegen, da es zu einfach ist, sich aus dem Server auszusperren, wenn es falsch gemacht wird oder in eine falsche Reihenfolge.
Wir empfehlen Ihnen, ein Bash-Skript zu verwenden, um diese Änderungen auszuführen.
Hier ein kleines Beispiel:
Wir gehen davon aus, dass wir einen Server mit einem Plesk-Setup haben, also benötigen wir Webserver, Mailserver, Plesk, SSH erreichbar.
1 |
nano /opt/rules.sh |
hier werden wir alle Regeln eingeben, die wir festlegen wollen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
#!/bin/sh # Flush all rules sudo iptables -t filter -F sudo iptables -t filter -X # Block everything by Policy sudo iptables -t filter -P INPUT DROP sudo iptables -t filter -P FORWARD DROP sudo iptables -t filter -P OUTPUT DROP # Allow already established connections sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT sudo iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT sudo iptables -t filter -A INPUT -i lo -j ACCEPT sudo iptables -t filter -A OUTPUT -o lo -j ACCEPT # Allow SSH connections (CHANGE HERE THE PORT TO YOUR SSH CONNECTION) sudo iptables -t filter -A INPUT -p tcp --dport 1923 -j ACCEPT sudo iptables -t filter -A OUTPUT -p tcp --dport 1923 -j ACCEPT # Allow Fake SSH connections sudo iptables -t filter -A INPUT -p tcp --dport 22 -j ACCEPT sudo iptables -t filter -A OUTPUT -p tcp --dport 22 -j ACCEPT # Allow DNS requests sudo iptables -t filter -A OUTPUT -p tcp --dport 53 -j ACCEPT sudo iptables -t filter -A OUTPUT -p udp --dport 53 -j ACCEPT sudo iptables -t filter -A INPUT -p tcp --dport 53 -j ACCEPT sudo iptables -t filter -A INPUT -p udp --dport 53 -j ACCEPT # Allow HTTP&HTTPS connections sudo iptables -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT sudo iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT sudo iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT sudo iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT # Allow FTP connections sudo iptables -t filter -A OUTPUT -p tcp --dport 20:21 -j ACCEPT sudo iptables -t filter -A INPUT -p tcp --dport 20:21 -j ACCEPT # Allow Mail SMTP connections iptables -t filter -A INPUT -p tcp --dport 25 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 25 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 465 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 465 -j ACCEPT # Allow Mail POP3 connections iptables -t filter -A INPUT -p tcp --dport 110 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 110 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 995 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 995 -j ACCEPT # Allow Mail IMAP connections iptables -t filter -A INPUT -p tcp --dport 143 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 143 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 993 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 993 -j ACCEPT # Allow Plesk HTTPS and HTTP connections iptables -t filter -A INPUT -p tcp --dport 8443 -j ACCEPT iptables -t filter -A INPUT -p tcp --dport 8880 -j ACCEPT # Allow NTP (server time) sudo iptables -t filter -A OUTPUT -p udp --dport 123 -j ACCEPT # Allow Ping Requests sudo iptables -t filter -A INPUT -p icmp -j ACCEPT sudo iptables -t filter -A OUTPUT -p icmp -j ACCEPT |
Lassen Sie uns nun die Datei verwenden:
1 2 3 |
cd /opt/ chmod +x rules.sh ./rules.sh |
Das lässt die Regeln so aussehen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# iptables -L Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:1923 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere tcp dpts:ftp-data:ftp ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ACCEPT tcp -- anywhere anywhere tcp dpt:urd ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s ACCEPT tcp -- anywhere anywhere tcp dpt:imap2 ACCEPT tcp -- anywhere anywhere tcp dpt:imaps ACCEPT tcp -- anywhere anywhere tcp dpt:8443 ACCEPT tcp -- anywhere anywhere tcp dpt:8880 ACCEPT icmp -- anywhere anywhere Chain FORWARD (policy DROP) target prot opt source destination Chain OUTPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:1923 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere tcp dpts:ftp-data:ftp ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ACCEPT tcp -- anywhere anywhere tcp dpt:urd ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s ACCEPT tcp -- anywhere anywhere tcp dpt:imap2 ACCEPT tcp -- anywhere anywhere tcp dpt:imaps ACCEPT udp -- anywhere anywhere udp dpt:ntp ACCEPT icmp -- anywhere anywhere |
6. Ein gefälschtes SSH installieren
(optional, dies kann gegen Bots und weniger erfahrene Hacker helfen, die vielleicht nicht einmal versuchen, den richtigen ssh-Port zu finden).
Check: https://github.com/tylermenezes/FakeSSH Es gibt weitere Möglichkeiten
1 2 3 4 5 6 7 8 |
apt-get install git cd /opt/ wget https://bootstrap.pypa.io/get-pip.py python get-pip.py pip install paramiko git clone https://github.com/tylermenezes/FakeSSH.git ssh-keygen |
Speichern unter /opt/FakeSSH/data/rsa
1 |
cp /opt/FakeSSH/data/config.sample.json /opt/FakeSSH/data/config.json |
Sie können /opt/FakeSSH/data/config.json nach Bedarf bearbeiten.
1 2 |
chmod +x /opt/FakeSSH/server.py chmod +x /opt/FakeSSH/stats.py |
1 |
nano /etc/init/fakessh.conf |
Fügen Sie dort hinzu:
1 2 3 4 5 6 7 |
# fakessh description "A fake SSH server" author "Tyler Menezes <tylermenezes@gmail.com>" start on runlevel [2345] stop on runlevel [016] respawn exec python /opt/fakessh/server.py |
Führen Sie nun die Datei server.py aus.
Beispiel:
1 2 |
cd /opt/FakeSSH/ screen -S "fakeSSH" -d -m ./server.py |
Nun, um es zu überprüfen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
$ nmap <Your IP or Hostname> -p- Starting Nmap 7.01 ( <a href="https://nmap.org" target="_blank" rel="noopener">https://nmap.org</a> ) at 2018-03-21 10:21 CET Nmap scan report for <Your IP or Hostname>.serverprofi24.de (<Your IP or Hostname>) Host is up (0.0074s latency). Not shown: 65519 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh <--- Fake port 25/tcp open smtp 53/tcp open domain 80/tcp open http 106/tcp open pop3pw 110/tcp open pop3 143/tcp open imap 443/tcp open https 465/tcp open smtps 993/tcp open imaps 995/tcp open pop3s 1923/tcp open unknown <--- Real port 4190/tcp open sieve 8443/tcp open https-alt 8880/tcp open cddbp-alt Nmap done: 1 IP address (1 host up) scanned in 2.77 seconds |
1 2 3 4 5 |
ssh root@<Your IP or Hostname> -p22 hello, welcome to my internet home! please don't guess my password! root@<Your IP or Hostname>'s password: Access denied |
Wie Sie sehen können, antwortet der Server und sagt immer, dass es sich um ein falsches Passwort handelt.
Also wird ein Bot, etc. denken, dass es ein echter Port ist.
Mit diesen Schritten sollte Ihr Server weitgehend sicher sein.
Wenn Sie Plesk verwenden, ist es wahrscheinlich auch empfehlenswert, dies zu überprüfen:
https://support.plesk.com/hc/en-us/a…best-practices
Achten Sie auch darauf, dass Ihre CMS-Systeme etc. immer auf dem neuesten Stand sind!
(DIES IST KEINE GARANTIE DAFÜR, DASS IHR SERVER HACKSICHER IST, ABER ES SOLLTE IN DEN MEISTEN FÄLLEN HELFEN).
Quelle: https://www.server4you.com/community/forum/operating-systems/debian/1780-how-to-basic-security-on-a-linux-server