Simple CCcam iptables script to block deleted users

There are 4 replies in this Thread which was already clicked 4,616 times. The last Post () by sunlight786.

    • Official Post

    Credit to sanciytinc for this.


    Requirements
    - CCcam Logfile (in this tutorial /var/log/cccam.log)
    - root Access
    - Cron Daemon
    - iptables


    Scripts
    /root/BanUser.sh



    Database examples
    /root/badhost.db


    Code
    81.20.200.170
    someremovedhost.dyndns.org


    /root/baduser.db


    Code
    deletedflineuser
    deletedflineuser2
    deletedflineuser3


    Cronjob
    /etc/cron.d/cccam-iptables


    Code
    */15 *     * * *     root   /root/BanUser.sh


    Fill into the file baduser.db deleted users, You can also use the badhost.db file to put the hostname or ip address. Already configured iptables rules will be deleted with this script so make attention.


    Tested with ubuntu.


    P.S: It's a good beginning to resolve the disconnecting client problems.

  • Hi Ten
    can i use this to oscam server running on ubuntu?
    all i want is to block 2 user IP example 192.0.0.1 and 192.0.0.2


    if possible then can you help me slightly further as its my first ever attemt .d,nt want any surprise by mistake.


    thanks

    • Official Post

    Hi Ten
    can i use this to oscam server running on ubuntu?
    all i want is to block 2 user IP example 192.0.0.1 and 192.0.0.2


    if possible then can you help me slightly further as its my first ever attemt .d,nt want any surprise by mistake.


    thanks


    If you use oscam just use this instead, no extra scripts needed.
    FailBan and OScam

  • I have ADD this under Globle and i found both of them in failban on main page.


    failbancount = 50 # count 50 time then ban
    failbantime = 518400 # that will cover the entire year rather than 5minut or 1 day.


    now my only concern is,
    according to this setting will the geniun user will be effect?

  • master G

    Added the Label Article

Your resource for Linux TV servers and smart card readers.

Find software downloads, drivers, and support for server setup and card-sharing configurations. Set up a Linux-based TV server. Access downloads and support for server software and USB card readers for advanced TV reception and management

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!