User Tools

Site Tools


iptables_firewall

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
iptables_firewall [2022/07/19 23:30] – Updated formatting adminiptables_firewall [2022/07/23 00:14] (current) admin
Line 244: Line 244:
 <code> <code>
  apt-get install fail2ban  apt-get install fail2ban
- <nowiki>//</nowiki>configuration file is in /etc/fail2ban.conf + #configuration file is in /etc/fail2ban.conf 
- <nowiki>//</nowiki>fail and ban logs are saved in /var/log/fail2ban.log and /var/log/faillog+ #fail and ban logs are saved in /var/log/fail2ban.log and /var/log/faillog
 </code> </code>
  
Line 261: Line 261:
 http://debaday.debian.net/2007/04/ <br> http://debaday.debian.net/2007/04/ <br>
 http://debaday.debian.net/2007/04/29/fail2ban-an-enemy-of-script-kiddies/ http://debaday.debian.net/2007/04/29/fail2ban-an-enemy-of-script-kiddies/
 +
 +==== fail2ban blocking apache2 htaccess attempts ====
 +Working on Debian Bullseye
 +<code>
 +vi /etc/fail2ban/jail.d/defaults-debian.conf
 +#below the entry for ssh, enter
 +
 +[apache-auth]
 +enabled = true
 +port     = http,https
 +logpath  = /var/log/apache2/error_vhostname.log
 +
 +/etc/init.d/fail2ban restart
 +
 +Make incorrect attempts. Monitor using "iptables -L" to see the entries after the failed attempts.
 +</code>
 +
  
 ===== Firewall on Centos / RH ===== ===== Firewall on Centos / RH =====
iptables_firewall.txt · Last modified: 2022/07/23 00:14 by admin