Linux

Determine false positive from rkhunter

I’ve installed rkhunter, a rootkit checking script, on a Ubuntu 7.10 (Gutsy Gibbons) distro and today it mailed a message saying that 3 files had their properties changed. The files were /usr/bin/chattr, /usr/bin/lsattr and /usr/bin/perlBefore doing anything I tried to update rkhunter to see if there had been any updates to fix this message rkhunter –update […]

Read More
Linux

Deny SSH- but allow SFTP access

This is an alternative way of limiting the SSH access to only SFTP explained in my How to restrict users to SFTP only instead of SSH post.Edit your /etc/sshd_config file and change your settings like thisMatch User usernameAllowTcpForwarding noX11Forwarding noForceCommand /usr/libexec/sftp-server -l INFO Replace username with the user name you would limit the SSH access […]

Read More
Security

Port Knocking

What is Port Knocking? Port knocking is a method by which you can dynamically open ports on your server to a single IP address. Port knocking allows you to transparently run a service on your server without exposing the services of that port to all IP addresses. In practice, it is very similar to having […]

Read More
Linux

Simple antivirus test using a text file

This is a simple test to check if your antivirus software is up and running Create a text file Insert the following text into the file X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* Save the file with the filename eicar.com Your antivirus software should detect this file as a virus and notify you about that. Your antivirus software is not working […]

Read More
Scripting

Shell script to monitor running services such as web/http, ssh, mail

Shell script to monitor running services such as web/http, ssh, mail etc. If service fails script will send an Email to ADMIN user monitor-linux-service.bash #!/bin/bash # Shell script to monitor running services such as web/http, ssh, mail etc. # If service fails it will send an Email to ADMIN user # ————————————————————————- # Copyright (c) […]

Read More