Posts

Showing posts with the label server

Installing Glances web server to run as a service on Ubuntu Linux

Image
Glances screenshot from the Glances documentation I wanted to have an easy way to monitor how my server is doing. Glances is a software that gives you a good overview of your system. So I decided to install it. I have a headless Ubuntu Linux server machine for random programming and hobby projects. It runs a web server and a couple of other services. With "headless" I mean the server doesn't have a monitor or a desktop environment. I also have Home Assistant installed on a Raspberry Pi 4. I wanted to bring the monitoring data there for easy review. Glances allows one to do that. It provides a web interface for directly checking the status of the machine and an API for Home Assistant to gather status data. Glances installation the Ubuntu way is problematic I first tried to install Glances using the built-in package manager apt. This proved to be a bad idea for two reasons. First off, the Glances version that you will get with apt is outdated. Especially if you have an olde...

Removing Apache signature "Apache X.X.X running on Ubuntu"

On ubuntu, edit the file /etc/apache2/conf.d/security and modify the lines starting with ServerTokens and ServerSignature so that they look like this: ServerTokens Prod ServerSignature Off

Making your SSH server more secure with fail2ban

Today, when I was checking the logs on my server, I noticed that someone was trying to hack it by quessing usernames and passwords. The command cat /var/log/auth.log Returned something like this: Invalid user danica from (attacker ip) input_userauth_request: invalid user danica [preauth] pam_unix(sshd:auth): check pass; user unknown pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(attacker ip) Failed password for invalid user danica from (attacker ip) port 20135 ssh2 Received disconnect from (attacker ip): 11: Bye Bye [preauth] reverse mapping checking getaddrinfo for (attacker host) [(attacker ip)] failed - POSSIBLE BREAK-IN ATTEMPT! Invalid user daniela from (attacker ip) input_userauth_request: invalid user daniela [preauth] pam_unix(sshd:auth): check pass; user unknown pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=(attacker ip) Failed password for invalid user daniela from (attacker ip) port 120...