Denyhosts chez Ubuntu 20.04

#建站合集SysAdmin

Malheureusement il n'y a pas de DenyHosts pour Ubuntu 20.04 via apt install.

Just download and set it up manually.

Site: https://github.com/denyhosts/denyhosts

cd /tmp/ && wget https://github.com/denyhosts/denyhosts/archive/refs/tags/v2.10.tar.gz

tar xzf *.tar.gz

cd denyHosts*

sudo python setup.py install

sudo cp /usr/local/bin/daemon-control-dist /etc/init.d/denyhosts

sudo nano /etc/init.d/denyhosts

Check if:

DENYHOSTS_BIN = “/usr/local/bin/denyhosts.py” 
DENYHOSTS_LOCK = “/run/denyhosts.pid” 
DENYHOSTS_CFG = “/etc/denyhosts.conf”
PYTHON_BIN = “/usr/bin/env python”
nano /etc/denyhosts.conf
# after choosing the right settings
sudo /etc/init.d/denyhosts start

The rest is the same as https://yyyyy.life/ohneconker/a-three-step-guide-on-how-to-secure-your-vps-even-further-with-denyhosts