Is your CCcam crashing? Here are two possible solutions!!

There are 6 replies in this Thread which was already clicked 5,261 times. The last Post () by gartner2000.

    • Official Post

    What is THE problem? You probably have unwanted users on your cccam server. Some users can cause cccam to crash.


    If you have /tmp/warnings.txt file you can see users that are logging to your server without your permission.


    There are two solutions:


    1. Block IP directly in your router. If you have router where you can use Tomato firmware, find this section ?> Administration/Scripts/Firewall. Then add this line:

    Code
    iptables -I FORWARD -d IP of user that is attacking you -j DROP


    This only works if user has static IP. If user doesnt have static IP there is another solution. BUT you need to be using Linux PC as cccam server. Solution is called Fail2Ban!


    If you have Fedora linux install Fail2Ban with this command: yum install fail2ban
    If you have Ubuntu use:

    Code
    apt-get install fail2ban


    Next command is (use telnet):

    Code
    nano /etc/fail2ban/jail.conf


    You need to look for this lines:


    # ?ignoreip? can be an IP address, a CIDR mask or a DNS host
    ignoreip = 127.0.0.1 192.168.1.72 ?> here you need to put addresses that will be ignored by fail2ban!
    maxretry = 3


    [cccam-12000]


    enabled = true
    port = 12000 ?> port of your cccam server. I have 12333 for example.
    filter = cccam
    action = iptables[name=CCcam0, port=12000, protocol=tcp] ?> here you only need to change port to 12333 for example.
    logpath = /tmp/warnings.txt
    maxretry = 10
    bantime = 6000 ?-> this is in seconds. User will be banned 6000 seconds.


    Next command (use telnet):

    Code
    nano /etc/fail2ban/filter.d/cccam.conf


    Add this into cccam.conf file:


    # Fail2Ban configuration file
    #
    # Author: Cyril Jaquier
    #
    # $Revision: 510 $
    #


    [Definition]


    # Option: failregex
    # Notes.: regex to match the password failures messages in the logfile. The
    # host must be matched by a group named ?host?. The tag ?? can
    # be used for standard IP/hostname matching and is only an alias for
    # (?:::f{4,6}:)?(?P\S+)
    # Values: TEXT
    #
    failregex = Connection from IP: Login Failed!


    # Option: ignoreregex
    # Notes.: regex to ignore. If this regex matches, the line is ignored.
    # Values: TEXT
    #
    ignoreregex =


    Next command is:

    Code
    /etc/init.d/fail2ban restart


    Last command is:

    Code
    chkconfig ?levels 235 fail2ban on


    With this command fail2ban will start automatically.


    Now all cccam crash problems should be gone.

  • Hi master G


    Could you explain these couple of lines a bit further please? I am a bit unsure where and what info to enter and why it is hashed out.


    # ?ignoreip? can be an IP address, a CIDR mask or a DNS host (could you explain a bit futher please?)


    ignoreip = 127.0.0.1 192.168.1.72 ?> here you need to put addresses that will be ignored by fail2ban! (Is this where you input your server ip?)
    maxretry = 3


    Regards

  • Hi masterg


    Any chace of an idiots guide please? Been trying for days to get my head around it. When I download fail2ban none of this text is in the jail.conf file


    [cccam-12000]

    enabled = true
    port = 12000 ?> port of your cccam server. I have 12333 for example.
    filter = cccam
    action = iptables[name=CCcam0, port=12000, protocol=tcp] ?> here you only need to change port to 12333 for example.
    logpath = /tmp/warnings.txt
    maxretry = 10
    bantime = 6000 ?-> this is in seconds. User will be banned 6000 seconds.


    I was wondering should I just add it? Do you think the text has been omitted from the fail2ban download now as you did write this in Jan 2011.


    Regards

  • Hi Everyone


    I got it working. I dont know if it will do the trick I.E stop Cccam crashing but I will let you know in a couple of days. I will also let you know exactly how I got it to work.


    Regards



    Hi, i have the same problem, i have a CCcam Server on Ubuntu and CCcam keeps restarting every 5 minutes, i removed all lines and i was testing with a local, but is the same, and i try to do the setting that is up, but didn't work, can someone help, thanks.

CCcam Support Forum

Configs, discussion, downloads and guides for CCcam Softcam.

Participate now!

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