| |
Denyhosts
DenyHosts is a log-based intrusion prevention security tool for SSH servers written in Python. It is designed to prevent brute-force attacks on SSH servers by monitoring invalid login attempts in the authentication log and blocking the originating IP addresses using /etc/hosts.deny and iptables on Linux server.
Exercise
On testub VM, clear the logs:
On testub VM, install denyhosts service:
Edit file /etc/denyhosts and comment the line with iptables
Restart denyhosts:
On the desktop, run ncrack on testub VM, then check
the content of /etc/hosts.deny. You should see the IP address of the desktop, 192.168.122.1 denied accessing sshd. Try ssh-ing from the desktop to testub
On testcent VM, clear the logs and install denyhosts
Run ncrack on testcent VM, then check its
/etc/hosts.deny content.
|
|