Mobile app version of vmapp.org
Login or Join
Frith620

: Fail2ban logs IP address trying to access server, enough? I have fail2ban and logwatch set up. There are IP addresses that are banned > 20 times every day for trying to brute force (I assume)

@Frith620

Posted in: #Block #Htaccess #IpAddress

I have fail2ban and logwatch set up. There are IP addresses that are banned > 20 times every day for trying to brute force (I assume) access the server.

I have added these IP addresses to the .htaccess file within the vhosts folder as well as within the root of the site folder.

e.g.
Order Allow,Deny
Deny from env=DenyAccess
Allow from all
SetEnvIf X-Forwarded-For "^xx.xxx.xx.xx" DenyAccess


(real IP hidden)

The .htaccess config does not stop these access attempts (which I can understand if they are simply trying to ssh our IP address rather than trying to access the site in the browser). Is there anything else I can do to ensure they don't get in? Will they always show on the logwatch regardless of the .htaccess? I have disabled root log in.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Frith620

1 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno851

I have just entered into /etc/hosts.deny the IP addresses I want to block

sshd: 123.456.789.10


And the offending IP addresses no longer show up on logwatch.
This is manual but there are ways to do this automatically. One way is to use the 'recidive' function of fail2ban itself

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme