- Joined
- Dec 18, 2018
- Messages
- 32
- Reaction score
- 26
- Points
- 18
I just wrote for oscam JAILS for fail2ban and FILTERS for all JAILS.
1st. step you have to install fail2ban if you don't have already.
sudo apt-get install fail2ban
2nd. step you have to edit the /etc/fail2ban/jail.conf file and add these lines before [sshd] content.
NOTE: here you have to change the path to your valid oscam.log path.
3rd. step you have to unzip and copy the attached file content to /etc/fail2ban/filter.d/
4th. step you have to restart your fail2ban
sudo service fail2ban restart
That's it.
Have Fun.
Regards.
1st. step you have to install fail2ban if you don't have already.
sudo apt-get install fail2ban
2nd. step you have to edit the /etc/fail2ban/jail.conf file and add these lines before [sshd] content.
NOTE: here you have to change the path to your valid oscam.log path.
Code:
#
# JAILS
#
[oscam-nouser]
enabled = true
filter = oscam_1
protocol = tcp
logpath = /var/log/oscam.log
banaction = iptables-allports
findtime = 1800
bantime = 36000
[oscam-disabled]
enabled = true
filter = oscam_2
protocol = tcp
logpath = /var/log/oscam.log
banaction = iptables-allports
findtime = 1800
bantime = 36000
[oscam-invalid]
enabled = true
filter = oscam_3
protocol = tcp
logpath = /var/log/oscam.log
banaction = iptables-allports
findtime = 1800
bantime = 36000
[oscam-duplicate]
enabled = true
filter = oscam_4
protocol = tcp
logpath = /var/log/oscam.log
banaction = iptables-allports
findtime = 1800
bantime = 36000
4th. step you have to restart your fail2ban
sudo service fail2ban restart
That's it.
Have Fun.
Regards.
Attachments
-
2.2 KB Views: 8