Quantcast
Aktuelles
Digital Eliteboard - Das Digitale Technik Forum

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

cccam über einen SSH-Tunnel mit dropbear

pergotromeom4

Newbie
Registriert
20. Juli 2011
Beiträge
4
Reaktionspunkte
0
Punkte
1
hallo,
hier mein tut wie ich cccam über einen ssh SOCKS5-Proxy server laufen lassen kann, getestet auf der dm500 mit OPENPLI image und dem dropbear(0.52) plugin
1)dropbear auf der dm installieren und im bluepanel aktivieren

2)openssh keyfile.ssh vom jeweiligen anbieter herunterladen.. (wer nur eine keyfile.ppk bekommt kann diese mit puttygen zu einer openssh Konvertieren)

3)linux distributionen griffbereit haben und dropbear installieren

4)die heruntergeladenen keyfile.ssh in ein verzeichnis seiner wahl in linux kopieren

5)terminal in linux öffnen und den befehl dropbearconvert openssh dropbear /verzeichnis/keyfile.ssh /verzeichnis/verzeichnis2/keyfile.ssh
abgeben (verzeichnisse müssen natürlich geändert werden in zb. root..)

6)die neu erstellte datei keyfile.ssh in /verzeichnis/verzeichnis2 jetzt auf die dm kopieren nach /var/etc/dropbear/

7)jetzt unter /var/bin/dropbear.sh folgendes reinkopieren...
ssh -i /var/etc/dropbear/keyfile.ssh -p SSH PORT -f benutzer1234@ip des ssh servers -L freier ssh port:cccam server IP:PORT von cccam -N

das ganze sollte dann so aussehen unter dropbear.ssh... (daten müssen natürlich angepasst werden)
#!/bin/sh
# Original script by "bartender"

if [ ! -e /var/etc/dropbear/dropbear_rsa_host_key ]; then
dropbearkey -t rsa -f /var/etc/dropbear/dropbear_rsa_host_key
fi

if [ ! -e /var/etc/dropbear/dropbear_dss_host_key ]; then
dropbearkey -t dss -f /var/etc/dropbear/dropbear_dss_host_key
fi

if [ -r /var/etc/dropbear/dropbear_rsa_host_key ] || [ -r /var/etc/dropbear/dropbear_rsa_host_key ]; then
dropbear
ssh -i /var/etc/dropbear/keyfile.ssh -p 222 -f tera-ssh@nl8.rvpn.in -L 1387:hompolti.org:1500 -N
fi


8)jetzt unter /var/etc/CCcam.conf folgedes hereinkopieren C: 127.0.0.1 1387 cccam username cccampasswort (der port muss der hinter -L sein)

9) box neu starten und die cccam abfrage laüft jetzt über einen SOCKS5-Proxy server

Hier das tut aus einer fremden quelle wie cccam über seinen eigenen ssh server laüft...
[DOWN] How to : cccam over ssh tunnel

'' Recently I have tried the cccam sharing over ssh tunnel and I like to share my experience with you.
Tools used :
SSH (v2) server running on my PC (debian)
dbox500s flashed with OPENPLI maxvar image
dropbear(0.52) plugin for OPENPLI

and some spare time
Du musst angemeldet sein, um Bilder zu sehen.


First of all you need to setup a ssh server for which I'm not going to explain here the steps. If you want you can google for it and you'll find thousands there in the web.
So,lets suppose that you have an up and running ssh2 server and you have configured that with your requirements.
Now,using your remote control of your dbox go to menu/setup/software management/downloads.../addonsp plugins and select Dropbear from the list shown on your tv screen. Press ok and install it.
Make sure that dropbear is selected as service to be run on your dbox.
Go to menu/setup/system settings/services to run/ and look if the dropbear is tagged.
After that you have to copy the public key from the dbox to your ssh2 server.
From a PC open a telnet(or ssh) session with your dbox and check the presence of dropbear script under /var/bin/ folder by giving this command:
ls -l /var/bin/dropbear.sh
If you look on that script created originally by a user "bartender" you will find there that it creates the public key for the first time before it runs.
**************************************************
dropbear.sh
#!/bin/sh
# Original script by "bartender"

if [ ! -e /var/etc/dropbear/dropbear_rsa_host_key ]; then
dropbearkey -t rsa -f /var/etc/dropbear/dropbear_rsa_host_key
fi

if [ ! -e /var/etc/dropbear/dropbear_dss_host_key ]; then
dropbearkey -t dss -f /var/etc/dropbear/dropbear_dss_host_key
fi

if [ -r /var/etc/dropbear/dropbear_rsa_host_key ] || [ -r /var/etc/dropbear/dropbear_dss_host_key ]; then
dropbear
fi
************************************************
The rsa and dsa keys are under /var/etc/dropbear folder as script above created them.
I tried to copy the content of dropbear_rsa_host_key to my ssh2 server ,but it showed only garbage and I don't understand why. What I did is the following:
Removed the keys that dropbear created by giving this command:

rm /var/etc/dropbear/*

and after I have created manually the rsa key by giving the command:

dropbearkey -t rsa -f /var/etc/dropbear/dropbear_rsa_host_key

On the screen of your telnet session you'll see a long row starting with ssh-rsa and ending with = root@dm500.
Select that line and copy in a notepad window. You have to use it later on your ssh2 server.
Now lets suppose that your cccam server from which your dbox gets the ecm
has the port 12345,your ssh2 server has the port 22 and you have created a user in your ssh2 server (adduser) named user1234.
Edit dropbear.sh of your dbox with vi editor and add these lines before the last fi.
sleep 5
ssh -i /var/etc/dropbear/dropbear_rsa_host_key -p 22 -f user1234@ip_of_your_ssh2server -L any_free_localport_greater_than1024:ip_of_cccam_se rver:12345 -N

and your dropbear.sh will look like this below
dropbear.sh
#!/bin/sh
# Original script by "bartender"

if [ ! -e /var/etc/dropbear/dropbear_rsa_host_key ]; then
dropbearkey -t rsa -f /var/etc/dropbear/dropbear_rsa_host_key
fi

if [ ! -e /var/etc/dropbear/dropbear_dss_host_key ]; then
dropbearkey -t dss -f /var/etc/dropbear/dropbear_dss_host_key
fi

if [ -r /var/etc/dropbear/dropbear_rsa_host_key ] || [ -r /var/etc/dropbear/dropbear_dss_host_key ]; then
dropbear
sleep 5
ssh -i /var/etc/dropbear/dropbear_rsa_host_key -p 22 -f user1234@ip_of_your_ssh2server -L any_free_localport_greater_than1024:ip_of_cccam_se rver:12345 -N

fi

Some explanations about the line:

ssh -i /var/etc/dropbear/dropbear_rsa_host_key -p 22 -f user1234@ip_of_your_ssh2server -L any_free_localport_greater_than1024:ip_of_cccam_se rver:12345 -N

--ssh -i /var/etc/dropbear/dropbear_rsa_host_key -p 22 -f user1234@ip_of_your_ssh2server -- says to start a secure shell session using the /var/etc/dropbear/dropbear_rsa_host_key,as user "user1234" to ssh2 server which listen to port 22 (-p 22) . The parameter -f is to run it in the background. The next part of the line which I really like:
-L any_free_localport_greater_than1024:ip_of_cccam_se rver:12345 -N
says that traffic which goes to the local port (-L) will be forwarded to the ip of cccam server on port 12345. The parameter -N is optional. It is just to avoid that you can give commands from dbox to the ssh2 server.
Lets give and example:
ssh -i /var/etc/dropbear/dropbear_rsa_host_key -p 22 -f user1234@myssh2server.no-ip.com -L 34567:mycccamserver.no-ip.com:12345 -N

There might be the case that your ssh2 and cccam are on the same server. In that case it should be like these:
ssh -i /var/etc/dropbear/dropbear_rsa_host_key -p 22 -f user1234@myssh2server.no-ip.com -L 34567:myssh2server.no-ip.com:12345 -N

Exit from vi editor (:wq) and make sure your changes are saved.
Now open a session with your ssh2 server and add the rsa key that your dropbear generated.
Go to the home directory of the user "user1234" with this command:
cd /home/user1234
There should be a hidden folder .ssh2 and under that is a file named
authorized_keys2. That is the file in which you should insert rsa key of your dbox.
Select the rsa key you have copied in notepad window and insert into
home/user1234/.ssh/authorized_keys2 or by using vim,nano editor,winscp or echo command,whatever you like for editing files.
After that you have to change some parameters of your ssh2 server file configuration. The file which contains ssh2 configuration this /etc/ssh2/sshd_config.
Make sure you have these lines there:


RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
UsePAM no

Please be very careful with these parameters above. It will cause that you cannot login anymore username and password. I recommend that you before making these changes google for "Key-Based SSH Logins With PuTTY " and read it carefully.

After making that changes you have to restart your ssh2 server by giving this command :
/etc/init.d/ssh restart

Now,open a telnet session with your dbox and edit the C line of your cccam server like this supposing that the local port which forwards traffic to ssh tunnels is 34567.
Suppose this below is your old cline which point to your cccam server:

C: mycccamserver.no-ip.com 12345 user1 password1 no

Comment it by adding # at the beginning of the line and it should be like this:
#C: mycccamserver.no-ip.com 12345 user1 password1 no
Now add this line as below:

C: 127.0.0.1 34567 user1 password1 no

where the 34567 is the port number with parameter -L which I have explained before.

After,reboot your dbox and you should have now redirected cccam traffic on ssh tunnel.

LE :
It might happens that you can switch to fta channels for a long time and after you cannot open any more scrambled channels. This is due to time out of ssh session. Just restart your dbox and the ssh tunnel start again. ''

thanks@freedream22


Quelle:forum.satmultimedia.ro

[/DOWN]
 
Zuletzt bearbeitet:
Zurück
Oben