#!/bin/sh
# CCCAM monitoring and firewalling scripts by eldon - eurocardsharing.com
# Filename : config.sh
# Version : 2b
# GLOBAL Options
LOGDIR="/emu/cccam/logs" #?? # FULL path to log files directory, no trailing /
WORKDIR="/emu/cccam/monitor"#?? # FULL path to work directory, no trailing /
BADDELAY=20 # bad command count duration in minutes
BADCOUNT=2 # bad command count
BADCOUNT_IG=4 # bad command count for protected accounts, use 0 for no limit
LOG=1 # main log 0(off)/1(on)
LOGECM=0 # Log ECM events 0/1 (extremely verbose)
LOGBADLOGIN=1 # Log failed login attempts, similar to built in warning.log 0/1
# IPTABLES Options
FWENABLE=1 # enable firewall 0(off)/1(on), applies to all firewalling
FWLOGIN=1 # firewall illegal logins 0/1
BAN=120 # ban duration in minutes
BANLOGIN=240 # ban duration in minutes for illegal login attemps. 0 to ban forever.
CARDSDELAY=0 # max duration in seconds to send the "cards" info, above that delay the event will be logged in the user log, counting as a bad command but no action will be taken, 0 to disable
CARDSBAD=6 # "cards" event duration that triggers a log & ban action, same as bad command, 0 to disable
FW="/sbin/iptables" # iptables command
# ssh command for remote firewalls
# replace remoteip with your firewall ip and adjust port (-p) if necessary
# ssh needs to be able to login without prompt, use ssh public keys
#SUDO="/usr/bin/ssh -x -p 22 root@remoteip"
# sudo command for local firewall, leave empty if you don't need sudo to run iptables
# default : /usr/bin/sudo -S
SUDO="" #??
SUPASS="" # sudo pass, leave empty if not required or when ssh is used instead of sudo
CHAIN="CCcam.x86" # user defined cccam iptables chain name
CHAINLOGIN="username.password" # username and password for CCcam. 192.168.0.5/16001?# user defined cccam iptables chain name for illegal logins
PORT="7777" # = open port in router,in CCcam.cfg is default 12000?# CCcam port
IP="192.168.0.5" # your cccam server ip (static ip only), leave empty if you are have a dynamic ip.
ETH="eth1" # your server network interface
# DO NOT EDIT BELOW #
if [ "$LOG" -eq 0 ]
then
MAINLOG=/dev/null
else
MAINLOG=$LOGDIR/monitor.log
fi