«•» GeoSharing Worlds No.1 Satellite Forum «•»

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • Dear Old Forum Members Please Register Your Account Again.And Please Use Your Old Username.We Lost All Our Old Data.frownfrown
    Thanks 
    <<Register Now>>

fail2ban for oscam (not the build in one)

-=EYEDREAM=-

Administrator
Staff member
Administrator
Moderator
Registered
Joined
Dec 18, 2018
Messages
32
Reaction score
13
Points
8
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.
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
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.
 

Attachments

Top