A Compleet Howto Install a CCcam Server Compleet With Scripts and a Lot of Tips
January 20, 2017 | Author: haks5 | Category: N/A
Short Description
Download A Compleet Howto Install a CCcam Server Compleet With Scripts and a Lot of Tips...
Description
hello to all, I saw a lot of questions on howto do some things. So I have made a Howto for making a succesfull stable CCcam Server, I use the Ubuntu 8.04.1 or 3 LTS is a good stable release. HYPERLINK "http://releases.ubuntu.com/hardy/" \t "_blank" http://releases.ubuntu.com/hardy/ But you can also use other versions. when you have installed Ubuntu and given it a static IP address this is very important!! and after that do the things written below. first open the therminal. then type sudo –i fill in your password when you see this # written it means do as root. (sudo –i) Install SSH; [/url]# apt-get install openssh-server # vim /etc/apt/sources.list remove all the # infront of the deb # deb……… (close with :wq enter) Update de sources.list; code; # apt-get update Install FTP server; # apt-get install proftpd (standalone&undefined) Make directory’s; code; # mkdir /var/etc # mkdir /var/keys # mkdir /var/script # mkdir /var/config # mkdir /var/backup # mkdir /var/cccamlog make yourself owner of the directory’s; code; # chown usernaam /var/etc # chown username /var/keys # chown username /var/script # chown username /var/config # chown username /var/backup # chown username /var/cccamlog # chown de username /usr/local/bin (home directory for CCcam.x86) Put CCcam.x86 in; /usr/local/bin
CCcam.cfg, CCcam.channelinfo, CCcam.providers in: /var/etc Make CCcam.x86 bootable with chmod; code; # chmod 755 /usr/local/bin/CCcam.x86 Make CCcam startup with every time you start/restart the Pc code; # nano /etc/rc.local write in rc.local; /usr/local/bin/CCcam.x86 This does CCcam.x86 boot when you start the Pc/ distro then place the scripts written below this post copy past wth linux i a text file and name the file like is written on top of the scripts (scriptname=) the scripts are attached under the post place the Scripts in /var/script Make them booteble; code; # chmod 755 /var/script/CCcamCheck.sh do this with all the scripts! what I do is restart the CCcam every morning because of the automatic configupdate I stop the server every night then it has enough time to install the new config and restart CCcam, the reason why I do it like this is that sometimes the card reader can/will not be detected this way it always works. And te reason I start this at 3:56 it has to be done in 4 minutes because of the CCcamCheck script. it would restart CCcam when the yob is not done yet. that’s why we need to make a Cron job ; # crontab -e 56 03 * * * killall CCcam.x86 57 03 * * * /var/script/configupdate.sh >>/var/cccamlog/configupdate.log 2>&1 58 03 * * * /var/script/keyupdater.sh >>/var/cccamlog/keyupdater.log 2>&1 59 03 * * * /usr/local/bin/CCcam.x86 */5 * * * * /var/script/CCcamCheck.sh 01 04 * * 1 /var/script/LogCleanup.sh >>/var/cccamlog/LogCleanup.txt 2>&1 save = ctrl X yes enter Install Apache2 # apt-get install apache2 Install PHP5; # apt-get install php5 then the server is ready to start the howto is attached under this post. Now the server is running maybe some of you are thinking !? no
firewall ?? I say no,but this does not mean that I don’t need to use a firewall, yes I use one but not in the server. A firewall is not always needed, for this you have more on a few good tips then installing more software then needed. a few of these are very important : 1. Do not take every share test his ping and card good . 2. Do not take more then 2 / 3 good cards from same provider /channels. 3. Do not take more then 2 hops away from you, best is only take the local hop1. 4. When you want to take a good exclusive card at hop3 then filter the cards you want to have. see explaination in (10) below. 5. When you share your card, only share the local with max 2 down hops (local only is best to do) 6. When you filter your incoming shares (C lines) then you reshare only good cards to your peers. 7. But there is a possibility to show the CCcam from your peer what cards you have by filtering. see explanation in nr (3) below. 8. When you have tried a share and he was not good in your eyes note his IP and don’t remove his F line instantly but set the line to F: user pass 0 0 0 { 0:0:0 } ! Why not delete him? when you delete him and he dos not delete your C line then you will have a lot of bad logins in your warningstext, and what you have this way is control if he has delete your line ore not. If his line not showing up after two weeks you can delete hime . 9. And one of the best tips I can give you is, stick whit your peers and do not delete him after a few days offline ore when a card dos not work direct or like with the sky italy peers who suffer from some actions taken by provider. Now some explanation of how to setup some good F lines and C lines F: ( { caid:id(:downhops), caid:id(:downhops), ... } { caid:id:sid, caid:id:sid, ... } { begintime-endtime, ... } ) hostname/ip address this is the explanation from the orginal config for the F line and if you read it well this says it all. And this is the same with the C line.
C: ( { caid:id(:uphops), caid:id(:uphops), ... } ) Let us do first the F line this is how the best looking F line looks like F: user pass 0 0 0 { 0:0:2 } this line gives only your local card and gives the peer rights to share 1 hop furter this F line nr 2 gives 2 F: user pass 1 0 0 { 0:0:2 } this line gives the peer the local shares you get. with the next line you make the peers to use your best cards only. 3 F: user pass 1 0 0 { 0:0:0, 0500:022610:2, 1722:0:2, 0500:020710:2 } what I did is give in the first place { 0:0:0} and then give the caid:id:downhops from canalsat, sky germany, HTB this way you give only the best card with extra reshare and no other cards. I took special for this explanation 2 cards with the same caid nr, this explains that you need some times to give the id in the F line and is not always a 0 { caid:id:downhops }. for the sky germany card is 0 enough. 4 F: user pass 0 0 1 { 0:0:2 } here do you give your local card first nr = 0 and with the third nr = 1 that gives your peer the rights to send EMM’s to your card ant update the entilements on your card. 5 F: user pass 0 1 0 { 0:0:2 } same as befor gives the rights to your peer to take emu keys but has to set behind the C line you gave him (yes) when he filters the line it will not work anymore because he needs to add no behind the C line. Now how to filter the C lines you get to get good shares / cards, C: ( { caid:id(:uphops), caid:id(:uphops), ... } ) 6 C: someserver.somedomain 12000 user1 pass1 this is how a normal C line looks without the emu’s this will give you all the cards to get. 7 C: someserver.somedomain 12000 user1 pass1 yes gives you the emu if the share has set the F line as I have written in example (5) 8 C: someserver.somedomain 12000 user1 pass1 no { 0:0:1 } this is the best line to use only take the local cards what your peer has. 9 C: someserver.somedomain 12000 user1 pass1 no { 0:0:2 } this is a good line when you have not to much peers with locals so you want to use other cards from them till hop2 for furter share/viewers is it hop3
10 C: someserver.somedomain 12000 user1 pass1 no { 0:0:1, 1702:0:3 , 0100:00006a:2, caid:id:uphops } in this case you take only local cards and all the 1702 sky germany cards till hop3 and all the cards from dutch Canal digital till hop 2 and furter you can take all cards that you have tested and you want to have . then some basic settings for a good working config ( but this is very case sensitive) SERVER LISTEN PORT : 15835 -------->never use defaut port 12000 everyone knows that port! ALLOW TELNETINFO: yes ALLOW WEBINFO: yes WEBINFO USERNAME : user ? WEBINFO PASSWORD : pass ? TELNETINFO USERNAME : user ? TELNETINFO PASSWORD : pass ? TELNETINFO LISTEN PORT : 16000 WEBINFO LISTEN PORT : 16001 ZAP OSD TIME : 0 #OSD USERNAME : #OSD PASSWORD : OSD PORT : 80 SHOW TIMING : yes DEBUG : no NEWCAMD CONF : no DISABLE EMM : yes EXTRA EMM LEVEL : no MINI OSD : yes SOFTKEY FILE : /var/keys/SoftCam.Key AUTOROLL FILE : /var/keys/AutoRoll.Key STATIC CW FILE : /var/keys/constant.cw CAID PRIO FILE : /var/etc/CCcam.prio PROVIDERINFO FILE : /var/etc/CCcam.providers CHANNELINFO FILE : /var/etc/CCcam.channelinfo SERIAL READER : /dev/ttyS0 --------------> this is very case sensitive SMARTCARD CLOCK FREQUENCY: /dev/ttyS0 3580000 B: /dev/ttyS0 00 BOXKEY: /dev/ttyS0 00 11 22 33 EMM THREADS : 1 # SECA HANDLER: 1 --------> for the dutch new seca3 cards. #MINIMUM DOWNHOPS: 1 ---------> this is a good option for Pc servers to block cards with no reshare LOG WARNINGS : /tmp/warnings.txt this is basic config but it is very case sensitive. depending on what cards you use. when you download a new CCcam version set then there is always a default config read that very carfull !!
Now the scripts we have to place in the /var/scripts because of every script writes his own log it will fill up some space on your HDD and to not let it go full this script cleans the log and it writes his own log to see if CCcam did have problems. This script cleans your logfile ones a week , every mody at 4:01 AM OWNER= yourusername frome the distro you use ############################################# scriptname = LogCleanup.sh ############################################# #!/bin/sh # Script to cleanup log files # Script written by Youknowhoo. OWNER= TARGETDIR_1=/tmp TARGETDIR_2=/var/cccamlog FILE_1=warnings.txt FILE_2=cccam.check FILE_3=CCcam.log FILE_4=configupdate.log echo && date if test -f $TARGETDIR_1/$FILE_1 ; then echo "warning text present!" chown $OWNER $TARGETDIR_1/$FILE_1 rm $TARGETDIR_1/$FILE_1 else echo "No warning text present?!?! Nothing to remove" fi if test -f $TARGETDIR_2/$FILE_2 ; then echo "Check File present!" chown $OWNER $TARGETDIR_2/$FILE_2 rm $TARGETDIR_2/$FILE_2 else echo "No Check File present?!?! Nothing to remove" fi if test -f $TARGETDIR_2/$FILE_3 ; then echo "CCcam Debug Log precent!" chown $OWNER $TARGETDIR_2/$FILE_3 rm $TARGETDIR_2/$FILE_3 else echo "No! CCcam Debug log present, CCcam did run perfect !!" fi if test -f $TARGETDIR_2/$FILE_4 ; then echo "Configupdate file present!" chown $OWNER $TARGETDIR_2/$FILE_4 rm $TARGETDIR_2/$FILE_4 else
echo "No Configupdate log present?!?! Nothing to remove" fi ---------------------------------------------------------------------------------------------------------------------------This script checks if CCcam is still running. this script is running every 5 min do not change that its more then enough. ########################################## scriptname= CCcamCheck.sh ########################################## #!/bin/sh #Script to check if the CCcam's are running. #Script is written by Youknowhoo. process=`ps auxwww | grep CCcam.x86 | grep -v grep | awk '{print $1}'` if [ -z "$process" ]; then echo "Couldn't find CCcam.x86 running Restarting CCcam Server" >>/var/cccamlog/cccam.check echo && date >>/var/cccamlog/cccam.check /usr/local/bin/CCcam.x86 -d >>/var/cccamlog/CCcamDebug.log else echo "CCcam.x86 is still OK!" >>/var/cccamlog/cccam.check fi ################################################## ####################### a new updated script it has the same name use one of these two ################################################## ####################### #!/bin/sh #this script is written By youknowhoo #i have added a part that checks if CCcam is responding like it should #that part is written by CC_share. #this way you can see if it was off(line) or frozen CHECKNAME="test.txt" IP="127.0.0.1" PORT="16000" process=`ps auxwww | grep CCcam.x86 | grep -v grep | awk '{print $1}'` if [ -z "$process" ]; then echo "Couldn't find CCcam.x86 running, Restarting CCcam" >> /var/cccamlog/cccam.check echo && date >>/var/cccamlog/cccam.check /usr/local/bin/CCcam.x86 else echo "CCcam process is present, now checking if CCcam is frozen" >> /var/cccamlog/cccam.check sleep 10 echo info|nc $IP $PORT >>/tmp/test.txt
set $(ls -s /tmp/test.txt) if [ "$1" = "0" ]; then echo "CCcam is frozen, restarting CCcam" >>/var/cccamlog/cccam.check echo && date >>/var/cccamlog/cccam.check /usr/local/bin/CCcam.x86 else echo "Cccam is responding like it should" >>/var/cccamlog/cccam.check fi rm /tmp/$CHECKNAME fi --------------------------------------------------------------------------------------------------------------------------------This script is for your config update every morning at 3:57 AM after CCcam is shut down at 3:56 it updates only ones a night so that no body suffer some freezes from the config changes you make. when you add a F line and make a Cline for a Peer/ Client then ask him to add it the next day because of the bad logins you get when he add’s you before. He will try to login but he can’t because of you did not add the F line in the config jet, ore maibe he uses the same sort script and there is no problem. When you add some changes you have to add the custommised CCcam.cfg in the directory /var/config ! then the script will check if there is a config present, if yes he will backup the actual one and remove the old backup and place the new config in the /var/etc after that, the crontab will restart CCcam at 3:59 . What the config also does is make a log file in /var/cccamlog ############################################# scriptname= configupdate.sh ############################################# #!/bin/bash #Script to process new config and backup old one #Script designed and written by CC_Share SOURCE=/var/config TARGET=/var/etc FILE=CCcam.cfg BACKUPDIR=/var/backup CONFIGOLD=CCcam.old if test -f $SOURCE/$FILE ; then echo "New Config Present" if test -d $BACKUPDIR ; then if test -f $BACKUPDIR/$CONFIGOLD ; then echo "Removing OLD config file from backup directory" rm $BACKUPDIR/$CONFIGOLD
else echo "No OLD config to remove." fi if test -f $BACKUPDIR/$FILE ; then echo "Renaming Backup to old config" cp $BACKUPDIR/$FILE $BACKUPDIR/$CONFIGOLD rm $BACKUPDIR/$FILE else echo "No Backupfile present yet" fi if test -f $TARGET/$FILE ; then echo "Copying Original config to Backup directory" cp $TARGET/$FILE $BACKUPDIR rm $TARGET/$FILE else echo "No Original Config File Present!?!?" fi else echo "Backup directory does not exist." echo "making new directory" mkdir $BACKUPDIR if test -f $TARGET/$FILE ; then echo "Copying Original config to Backup directory" cp $TARGET/$FILE $BACKUPDIR else echo "No Original Config File Present!?!?" fi fi echo "Moving New config file to "$TARGET cp $SOURCE/$FILE $TARGET rm $SOURCE/$FILE else echo "No New Config present, Nothing to process" fi exit ----------------------------------------------------------------------------------------------------------------------------the last script is for the key updates that is be done every night ones at 3:58 AM you have to change some * to make it comlpeet! I can and will not post complete links. ########################################## scriptname= keyupdater.sh ########################################## #!/bin/bash wget -qO /var/keys/SoftCam.Key HYPERLINK "" \t "_blank" http://w*w.uydu.ws/deneme6.p*p?file=SoftCam.*ey wget -qO /var/keys/AutoRoll.Key HYPERLINK "" \t "_blank"
http://w**.softcam.tv/deneme6.*hp?file=AutoRoll.K*y ---------------------------------------------------------------------------------------------------------------------------when you use a program to add the scripts please use the program WinSCP because you get problems with the scripts. and for everyone who has some problems with the scripts you can use this link its for cleanup the scripts from the ^M HYPERLINK "http://www.dos2unix.org/" \t "_blank" http://www.dos2unix.org/ big thanks for grizzlygaz providing the link
see also this tuto; this is a install script for CCcam on ubuntu realy easy and fast!!!!!1/2 hour including Ubuntu INCLUDEPICTURE "http://www.cccamforum.com/forums/images/smilies/set1/scared.gif" \* MERGEFORMATINET HYPERLINK "http://www.cccamforum.com/forums/showthread.php? t=41856" \t "_blank" http://www.cccamforum.com/forums/showthread.php?t=41856 Attached Files INCLUDEPICTURE "http://www.cccamforum.com/forums/images/attach/zip.gif" \* MERGEFORMATINET HYPERLINK "http://www.cccamforum.com/forums/attachment.php? s=9b93939754a4fdf3818c30732f92acbd&attachmentid=789&d=1261420197" scripts.zip (3.2 KB, 2413 views) INCLUDEPICTURE "http://www.cccamforum.com/forums/images/attach/zip.gif" \* MERGEFORMATINET HYPERLINK "http://www.cccamforum.com/forums/attachment.php? s=9b93939754a4fdf3818c30732f92acbd&attachmentid=790&d=1261420536" cccam server howto by youknowhoo.pdf.zip (30.6 KB, 2386 views) Last edited by youknowhoo; 26.04.2010 at 04:08 PM.
ports checking _http://www.canyouseeme.org/ dns host _http://www.dyndns.com/
if both of you and your friend have a card , config should be like this , your box , F: user1 pass1 1 0 0 { 0:0:2 } C: his.dyndns.org 12000 user2 pass2 no { 0:0:2 } his box , F: user2 pass2 1 0 0 { 0:0:2 } C: my.dyndns.org 12000 user1 pass1 no { 0:0:2 }
or for a single card with you as the host and him as a client your box , F: user2 pass2 1 0 0 { 0:0:2 } his box , C: his.dyndns.org 12000 user2 pass2 no { 0:0:2 }
and use a fixed ip on your box (dlan off ) , ensure the router forwards the port or ports to the box or boxes ip address (es) , and ensure the router logs into the dns by checking both the router and the dns itself to make sure you internet ip address is being passed on and logged by the dns host the port is opened by the wan due to the router forwarding the port , in the above examples port 12000 a person doing the sending has an F line in the F section a person doing the receiving has a C line in the C section so add the extra lines in and leave the rest in there for reference , or simply because you are unsure what any of it is
doing also when in doubt , leave well alone ! so if you are both sending and receiving ( sharing ) , add suitable F and C lines to both persons configs a # at the beginning means the line is for reference only , and isnt used so the newly added F and C lines will not have a # at the start
View more...
Comments