Welcome!

Welcome to Satlover forums, full of great people, ideas and excitement.

Please register if you would like to take part. link..

Register Now

Alert: Don't Use Hotmail Email Accounts for registration

Collapse

Before Access to all Forums and Trial accounts you must need to activate your account Email address

How to setup CCcam with ClearOS 5.2 Linux with OPENVPN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nightmares
    Banned
    • Feb 2012
    • 3

    How to setup CCcam with ClearOS 5.2 Linux with OPENVPN

    I`m going to setup a secure server with great stabilty , it works very well
    my server setup excted me more then 5 days to do it well
    i have used a lot of tutrials but now im getting a new tutorial with all the things from the beginig to the end with some small differences


    First you are going to setup the clearos 5.2 version (this is the verion that i have used )

    What is ClearOs you ask!? ClearOs is a powerful network and gateway server designed for small organizations and distributed environments. Though ClearOs comes with an extensive list of features and integrated services (see sidebar), the solution is easy to configure thanks to the intuitive web-based interface.

    Go to download page http://www.clearfoundation.com/compo...func,download/

    Installation steps:
    1) Choose a Language: Installation language
    2) Keyboard Type: Your keyboard language
    3) Installation Method: Local CDrom
    4) Install Type: Install
    5) To Proceed with the installation type "ClearOs"
    6) System Mode: Standalone Mode
    7) Specify Lan IP Address: Manual Configuration (Set dynamic ip configuration if your router support MAC based static lease)
    8) Nameserver IP: your router gateway IP (example 192.168.1.254 or what u have there)
    9) Set The System Root Password
    10) Partitioing: Use default
    11) Select Software Modules: I have installed all of them


    Now if ClearOs is installed and you used manual IP table then you can unplug monitor and keyboard from PC you do not need them anymore.
    If you used automatic DHCP, then log to server from current monitor and keyboard to know what IP your server has.
    Use command: ifconfig
    Now you see your server IP, unplug monitor and keyboard from PC

    4: System setup.
    1) Write to your webbrouser next https://192.168.x.***:81 of cource your server lan IP.
    2) Next u get warning message like so "This Connection is Untrusted"
    Hit the tab "I Understand the Risks", then the tab "Add Exception" and at least "Confirm Security Exception" (It can happen that u need make 2-3 times that over again, when u get to the login page!)
    3) Login
    Username: root
    Password: What u entered during the ClearOS installation
    4) Language: default is English
    5) Network: Please set mode to "Standalone Mode No Firewall" later if everything is working u can enable Firewall if u want it.
    6) Time Zone: set your country
    7) Domain: you can leave it to default "clearos.lan" or change. It is up to you.
    8) Organization: fill the forms like u want, not needed to use your real data there.
    9) Congratulations, you have completed the system setup wizard! and hit the tab "Continue configuring your system"
    10) Finish: and again u need make that step "This Connection is Untrusted" Hit the tab "I Understand the Risks". Then the tab "Add Exception" then "Confirm Security Exception" and at last "Resend". (It can happen that with FireFox brouser u need make 3-5 times that over again, when u get to the main page back!)

    After all these i updated my clearos going to clearcenter
    1.software updates
    2.software modules

    Set up the Dashboard.
    1) Hit on tab "ClearCenter" and "Register System". (If you had already ClarkConnect registered, then same data u can use forward with ClearOS as well. But if you are new user then hit that link and register your self: Register ClearOS
    2) Hit on tab "ClearCenter" and "Software Modules" From there tick "FTP server module" and hit "Go". Wait, when it finish install. Depends from system speed from 2-3 minutes it can take, but you get constant info as well to when it is finish.
    3) Close the dashboard window complete and open it again, then u see new Tab up there called "Server" and under that is now FTP. Next open that FTP and set "Status - Running" as "On boot - Automatic". "Maximum Instances" set down from 30 to 1
    4) Open tab "Directory" and "Users" Now u have message there "The required user database engine is not running. Continue" Please hit that "Continue" tab now.
    5) LDAP is used to store user and password information. Just hit there "Update" tab.
    6) Open again "Directory" and "Users". Now hit the tab "Add" and fill the next form:


    Code:
    Username: username (your FTP and Home directory username)
    First Name: user
    Last Name: name
    Password: ***xx (your FTP access password)
    Verify: ***xx
    Hit the tab "Add" to save new user data.


    Download CCcam pack and FTP client software. Unpack CCcam pack and take out from there CCcam.x86 and CCcam.cfg.




    Open FTP client app add there lines like so:
    Session: server
    Host named: 192.168.x.***
    User name: username
    Password: ***xx
    Now OK and connect to server


    Copy with FTP client CCcam.x86 and CCcam.cfg to a folder that you have created for ex folder server. If it is done close the FTP session.



    Now we need open Putty. If you do not have putty you can download it here: Download putty for windows PC
    Log with putty to server as root not as user blabla!
    Now we can put some commands to get CCcam to right place.


    10: Commands: (command "ls" is directory viewer) Please give commands exactly like i write here then it works 100%!!!


    Code:
    cd /var
    mkdir /var/bin
    mkdir /var/etc
    ls

    Note: mkdir is command for create new directory. If you see now 2 new directory then that part is OK. Next commands are:


    Code:
    cd /[B]folder[/B]
    ls
    Note: that folder is user what you created under dashboard and you see there CCcam.x86 and CCcam.cfg.

    Code:
    cp CCcam.x86 /var/bin
    cp CCcam.cfg /var/etc

    Note: cp is command for copy. Command rm is for delete.

    Code:
    cd /var/bin
    ls
    chmod 755 CCcam.x86
    ls
    Note: Now you see that CCcam.x86 is green, before it wase withe.

    CCcam auto startup script:

    Code:
    nano /etc/rc.d/rc.local
    Note: there you see line like that: "touch" and so one. under that line is lot empty space. Now please write next line exact under that "touch" line there so:

    Code:
    /var/bin/CCcam.x86
    Note: / you can get there only with shift+7 and ctrl+o is save file and ctrl+x exit. Look out that you do not change there nothing else!

    Code:
    cd /var/bin
    ls
    ./CCcam.x86
    Note: ./CCcam.x86 is command to start CCcam manually from command line and command: killall CCcam.x86 stops it agan. For CCcam debuge mode use command: ./CCcam.x86 -d
    Note 2 : you see that the cccam is not running

    Code:
    cd /var/etc
    ls
    nano CCcam.cfg
    Note: with that command you have access to cfg file to edit it or you can use ftp program to edit this file , it better to me




    How to get CCcam 2.1.0, 2.1.1 and 2.1.2 working with ClearOs 5.2 CCcam 2.1.3, 2.1.4 as 2.2.x donīt work with ClearOs 5.2!


    Please give next commands into your system command line:

    Code:
    mkdir test
    cd test
    wget http://web.zone.ee/kapzas/libstdc++.so.6.0.9
    cp libstdc++.so.6.0.9 /usr/lib
    cd /usr/lib
    chmod 755 libstdc++.so.6.0.9
    unlink libstdc++.so.6
    ln -s libstdc++.so.6.0.9 libstdc++.so.6
    /sbin/ldconfig
    cd ..
    cd ..
    rm -rf test
    Now we can start the cccam

    Code:
    cd /var/bin
    ls
    ./CCcam.x86
    Here is tutorial how to install No-Ip under ClearOs:
    You need first install cc-devel developers package to be abel to execute no-ip install commands:


    Code:
    yum groupinstall "Development Tools"
    cd /home/folder
    mkdir no-ip
    cd no-ip
    wget [url]http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz[/url]
    tar zvxf noip-duc-linux.tar.gz
    cd noip-2.1.9-1
    make
    make install
    Note: that folder is user what you created under dashboard!

    Put your no-ip account login/email string

    Put password to that login/email

    Enter update interval: [30] write to there 30 Then no-ip makes updates to your IP every 30 minute

    Do you wish to run something at successful update? [N] (y/n) hit n

    Code:
    cd .. and agan cd ..
    rm -rf no-ip
    and hit enter
    type command exit to leave.
    Done.
    You have successfuly installed no-ip under linux.



    Tutorial how to create CCcam running check script and if CCcam stops then that script runs CCcam self up again.

    1) Log over putty to server as root and give next commands to create the script:

    Code:
    cd /etc
    touch CCcamcheck.sh
    chmod 777 CCcamcheck.sh
    nano CCcamcheck.sh
    Next copy all that inside the CCcamcheck.sh:

    Code:
    #!/bin/bash
    if ! ps -C CCcam.x86 > /dev/null
    then
        /var/bin/CCcam.x86
    fi
    Next hit from your keyboard ctrl+o to save and ctrl+x to exit.


    2) Now we need make a cron job what executes the script every 5, or from you set minutes. Please give next commands to make a cron job:

    Code:
    cd /etc
    export EDITOR="nano"
    crontab -e
    There add new line to the job list so:

    Code:
    */5 * * * * /etc/CCcamcheck.sh
    3 minute cron:

    Code:
    */3 * * * * /etc/CCcamcheck.sh
    1 minute cron:
    Code:
    */1 * * * * /etc/CCcamcheck.sh
    I know that "CCcam running check script" is not the best one, but it works well and it is easy to use. If u want use more complicate script then they you find in forum.

    Manual way to compile self Oscam for ClearOs with support of webinterface, smargo smartreader (USB), serial (COM) reader, mouse (USB) reader and omnikey/SCM (PCSC) reader.

    1) ClearOs update for compile task needed new packages:

    Code:
    yum update
    yum groupinstall "Development Tools"
    yum install openssl-devel
    yum install pcsc-lite-devel
    mkdir cmake
    cd cmake
    wget [url]http://www.cmake.org/files/v2.6/cmake-2.6.4.tar.gz[/url]
    tar xvzf cmake-2.6.4.tar.gz
    mkdir cmake-build
    cd cmake-build
    ../cmake-2.6.4/bootstrap
    gmake
    sudo gmake install
    cd ..
    rm -rf cmake
    2) Compiling the oscam. After rename and copy to the new path:

    Code:
    cd /usr/src
    svn co [url]http://www.oscam.to/svn/oscam/trunk[/url] oscam
    cd /usr/src/oscam
    cmake -DWEBIF=1 -DPCSC=1
    make
    mv oscam oscam.x86
    cp oscam.x86 /var/bin
    cd ..
    rm -rf oscam
    3) New attributes for launch:

    Code:
    cd /var/bin
    chmod 755 oscam.x86
    4) Oscam auto startup:

    Code:
    nano /etc/rc.d/rc.local
    Note: there you see line like that: "touch" and so one. under that line is lot empty space. Now please write next line exact under that "touch" line there so:

    Code:
    /var/bin/oscam.x86
    If u have already added CCcam and newcs too, then it looks like so:

    Code:
    /var/bin/oscam.x86
    /var/bin/CCcam.x86

    5) Oscam config flies copy to correct path and new attributes set:

    Code:
    cd /usr/local/etc/
    wget [url]http://web.zone.ee/kapzas/oscam.conf[/url]
    wget [url]http://web.zone.ee/kapzas/oscam.server[/url]
    wget [url]http://web.zone.ee/kapzas/oscam.user[/url]
    wget [url]http://web.zone.ee/kapzas/oscam.services[/url]
    chmod 755 oscam.conf
    chmod 755 oscam.server
    chmod 755 oscam.user
    chmod 755 oscam.services
    At last edit oscam config files for your needs. If u want update your oscam for latest svn just run setp 2) and 3) over again. How to conf oscam for your needs you find from ECS, ****** or try
    Oscam config sampels for various cards


    Oscam links what are very usefull:
    Oscam links what are very usefull:






    after all give a restart to your server and see that all is ok
    you can check /var/log/messages what`s going on

    OPENVPN
    now lets start to the open vpn server

    i can explain here or just go to this tutorial OPENVPN HOW

    before you are goinging to setup the openvpn server you must go to check your organization in directory tab
    for me the best in the Internet Hostname write down yor ip ( static one or the dyndns host or no-ip that you have used before ) it is better for your config for the clients that you will have
    after that you can go
    Network - OPENVPN

    Domain
    The default domain used by the OpenVPN client, for example example.com or 10.8.0.1

    WINS Server

    The Microsoft Networking WINS server used by the OpenVPN client. Depending on your network configuration, you may need to specify the WINS settings in VPN client configuration. If you are using ClearOS as your WINS server, please specify the LAN IP address of the ClearOS system.

    DNS Server

    The DNS server used by the OpenVPN client. If you are using ClearOS as your DNS server, please specify the LAN IP address of the ClearOS system. eg 10.8.0.1

    Manage User Accounts

    Users must be configured with OpenVPN access. To manage users, go to the Users page in webconfig. When a user is created, a certificate key/pair that is required for the OpenVPN system is automatically created.
    Direcory account users
    click ADD BUTTON
    give all the details
    username , password and so on

    for example : username :user1
    password : user123

    now lets see the server config that is created in /etc/openvpn/server.conf
    the server.conf must look like here, if it is not you can edit it like this because i have done some changes
    you can olso see the vpn server config HOWTO OPENVPN
    Code:
    local 192.168.*.***
    port 1194
    proto udp
    dev tun
    ca ca.crt
    cert server.crt
    key server.key  # This file should be kept secret
    dh dh1024.pem
    server 10.8.0.0 255.255.255.0
    ifconfig-pool-persist ipp.txt
    push "redirect-gateway def1 bypass-dhcp"
    keepalive 10 120
    comp-lzo
    ;max-clients 100
    ;user nobody
    ;group nogroup
    persist-key
    persist-tun
    status openvpn-status.log.
    verb 3
    mute 20
    client-cert-not-required
    username-as-common-name

    Configuring the Client

    To configure the Windows OpenVPN client:

    Download and install the client software – download page
    Login to webconfig as the OpenVPN user (not the root/administrator account!)
    Go to the Directory My Account Security and Keys in the menu system. You will need to download the certificate, certificate authority, key and the OpenVPN configuration file into the configuration directory on your Windows system.
    now just get start to your openvpn verver
    Just Click start button and To Auto

    To configure the LINUX OR Dreambox OpenVPN client is simililar this

    when you download all the certificates form the server you must edit the file named system.clearos.ovpn to client.conf

    im giving you a sample how must be your client.conf

    Code:
    client
    remote username.no-ip.com 1194
    dev tun
    proto udp
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    ca /var/etc/openvpn/keys/ca-cert.pem
    cert /var/etc/openvpn/keys/client-client-cert.pem
    key /var/etc/openvpn/keys/client-client-key.pem
    ns-cert-type server
    log  /var/etc/openvpn/openvpn.log
    comp-lzo
    verb 3
    auth-user-pass pass.txt
    now the 3 other files

    ca-cert.pem
    client-client-cert.pem
    client-client-key.pem

    you must put them to /var/etc/openvpn/keys/

    now OPENVPN need olso a login

    you can create a text file named
    Code:
    user.txt
    that have username and password like here

    username : user1
    password : user123

    the text doc is :

    Code:
    user1
    user123
    this file is located with client.conf in the /var/etc/openvpn in your dreambox for example

    I HAVE MADE TESTES WITH DREMBOX , SIFTEAM , AND OPNEVPNPLUGIN 2.1.4
    I DON`T KNOW FOR THE OTHER VERSIONS


    For me this is very great because you can manage the client openvpn form clearos : users
    you can edit them , you can delete them or add anothers

    you can see the logs which of the clients are conected in your vpn server

    /var/lib/openvpn

    here are the logs
    ipp.txt
    openvpn-status.log

    NOTE : AFTER DOWNLODING THE FILES FOR 1 CLIENT TEST IT WITH WINDOWS OPNEVPN AND SEE IFF IS EVERYTHING OK



    Gice a restart for the system to see if everything is ok

    After all is ok now you must start the firewall but first you need to configure it

    you must open the ports in network firewall incoming
    1. OPENVPN 1194 UDP
    2. your webconfig port : 81 tcp
    3. putty port : 22 tcp
    4. ftp port : 21 TCP
    5. your cccam server port that you have for ex : 12000 tcp
    6. webinfo for the cccam : 16001 tcp
    and all the port that you need
    REMEMEMBER : YOU MUST OLSO OPEN THE PORTS TO YOUR ROUTER


    after this you can go to enable yor firewall

    network ipsettings : MODE Change it to Standalone MODE

    i think that it all what i have done maby i have forgotten something i will post again
    NOTE : AFTER ALL THIS , WHEN IT IS OK JUST MAKE A BACKUP DATA IN SYSTEM BACKUP SETTINGS



    NOW JUST CONFIG JOUR CCCAM.CFG
    there are many tutorials how to config your cccam.sfg

    Code:
    F: user123 user345 
    SERVER LISTEN PORT : 12000 
    HTML INFO LISTEN PORT : 16001
    ALLOW TELNETINFO: no
    WEBINFO USERNAME : username
    WEBINFO PASSWORD : password
    SHOW TIMING : yes
    DEBUG : yes
    DISABLE EMM : yes
    EXTRA EMM LEVEL : no
    MINIMUM DOWNHOPS: 1
    LOG WARNINGS : /var/etc/warnings.txt
    CHANNELINFO FILE : /var/etc/CCcam.channelinfo
    PROVIDERINFO FILE : /var/etc/CCcam.providers
    NOTE: Change your port number from 12000 to 40000 or higher

    remember yor Client C LINE must be

    Code:
    C: 10.8.0.1 12000 user123 user345


    I THINK THIS IS ALL WHAT I HAVE DONE CREATING MY SERVER IN ONE WEEK BUT YOU CAN MAKE IT IN 2 HOURS

    THANK YOU ALL FOR YOUR TUTORIALS

    GOOD SHARE

    [B][SIZE="6"]NightMares
  • dm800pvr
    Junior Member
    • Nov 2011
    • 10

    #2
    Re: How to setup CCcam with ClearOS 5.2 Linux with OPENVPN

    I have no idea whats the benefits of installing oscam since it's another type of card sharing module and un related to cccam!
    and also whats the purpose of installing OPENVPN at all?!

    Comment

    Working...