ubuntu:18-04_server_install
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| ubuntu:18-04_server_install [2019/04/07 00:15] – [Logfile] Fehler entfernt Sebastian Hetzel | ubuntu:18-04_server_install [2019/06/27 23:02] (aktuell) – [Reaktivierung von ifupdown] Deaktivierung weiterer Dienst Sebastian Hetzel | ||
|---|---|---|---|
| Zeile 3: | Zeile 3: | ||
| An dieser Stelle ist das Basis-Setup bereits durchgeführt. | An dieser Stelle ist das Basis-Setup bereits durchgeführt. | ||
| + | **Hinweis zur Ubuntu-18.04-Installations-CD / ISO:** \\ Wird das Setup auf Deutsch umgestellt, dann ist es nicht möglich, manuell eine IP-Konfiguration während des Setups zu definieren. Dies scheint ein Bug zu sein, da die Möglichkeit bei der Installation mit der Locale " | ||
| + | ===== APT-Paketserver ===== | ||
| + | |||
| + | Ändert die APT-Quelle von den regionalen Paketserver auf die Hauptserver von Ubuntu. | ||
| + | |||
| + | < | ||
| + | # sed -i ' | ||
| + | </ | ||
| ===== Nervig: SSH Connection timeout ===== | ===== Nervig: SSH Connection timeout ===== | ||
| Zeile 54: | Zeile 62: | ||
| ===== Reaktivierung von ifupdown ===== | ===== Reaktivierung von ifupdown ===== | ||
| - | Um netplan zu deaktivieren | + | Um netplan.io zu deaktivieren, |
| < | < | ||
| Zeile 87: | Zeile 95: | ||
| systemctl stop systemd-resolved.service | systemctl stop systemd-resolved.service | ||
| systemctl mask systemd-resolved.service | systemctl mask systemd-resolved.service | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | systemctl disable systemd-networkd-wait-online.service | ||
| + | systemctl stop systemd-networkd-wait-online.service | ||
| + | systemctl mask systemd-networkd-wait-online.service | ||
| </ | </ | ||
| Zeile 314: | Zeile 328: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | ===== Fail2Ban ===== | ||
| + | |||
| + | Fail2Ban sollte meiner Meinung nach auf jeder Maschine laufen, die über SSH im Internet administriert wird. Natürlich ist die Absicherung weiterer Dienste wie SMTP, FTP, usw. ebenso sinnvoll. | ||
| + | |||
| + | ==== Installation und erste Konfiguration ==== | ||
| + | |||
| + | < | ||
| + | # aptitude install fail2ban | ||
| + | </ | ||
| + | |||
| + | <file > | ||
| + | [...] | ||
| + | |||
| + | # " | ||
| + | # will not ban a host which matches an address in this list. Several addresses | ||
| + | # can be defined using space (and/or comma) separator. | ||
| + | #ignoreip = 127.0.0.1/8 ::1 | ||
| + | ignoreip = 127.0.0.1/8 | ||
| + | |||
| + | [...] | ||
| + | |||
| + | # External command that will take an tagged arguments to ignore, e.g. <ip>, | ||
| + | # and return true if the IP is to be ignored. False otherwise. | ||
| + | # | ||
| + | # ignorecommand = / | ||
| + | ignorecommand = | ||
| + | |||
| + | # " | ||
| + | bantime | ||
| + | |||
| + | # A host is banned if it has generated " | ||
| + | # seconds. | ||
| + | findtime | ||
| + | |||
| + | # " | ||
| + | maxretry = 6 | ||
| + | |||
| + | [...] | ||
| + | |||
| + | # | ||
| + | # JAILS | ||
| + | # | ||
| + | |||
| + | # | ||
| + | # SSH servers | ||
| + | # | ||
| + | |||
| + | [sshd] | ||
| + | enabled = true | ||
| + | # To use more aggressive sshd modes set filter parameter " | ||
| + | # normal (default), ddos, extra or aggressive (combines all). | ||
| + | # See " | ||
| + | #mode = normal | ||
| + | port = 4444 | ||
| + | logpath = %(sshd_log)s | ||
| + | backend = %(sshd_backend)s | ||
| + | |||
| + | [...] | ||
| + | </ | ||
| + | ==== IP entsperren ==== | ||
| + | |||
| + | < | ||
| + | # fail2ban-client set < | ||
| + | </ | ||
ubuntu/18-04_server_install.1554588900.txt.gz · Zuletzt geändert: von Sebastian Hetzel
