Back to Home

Zebedee - secure TCP and UDP tunnel

zebedee · secure tunnel · rdp

Zebedee - secure TCP and UDP tunnel

    The name of the Zebedee tunnel comes from its three components:
    - Zlib compression
    - Blowfish encryption
    - Diffie-Hellman key agreement.

    What is it and why


    Zebedee creates an encrypted tunnel with compression for transmitting data over TCP and / or UDP protocols. Among the advantages, I would like to note the ease of installation and configuration of the client and server parts for MS Windows, Linux, FreeBSD, etc.

    The basic principle of operation is shown below :

     [source] <===> [client] <=====> [server] <===> [target]
                | | |
                + - insecure | + insecure
                   connection | connection
                                + - secure tunnel


    IRL


    One wonderful morning, suddenly, I needed to see a desktop server (Win 2k3), which was very far from me, on the internal subnet, behind the gateway (FreeBSD). I’ll say right away: I know about the existence of VPN, SSH tunnels, VNC, etc, but for some reason I used exactly what will be discussed below. Therefore, the above scheme has become:

     [my laptop] <===> [zebedee client @ WinXP] <=====> [zebedee server @ FreeBSD] <===> [Win 2k3]
                     | | |
                     + - insecure | + insecure
                         connection | connection
                                                  + - secure tunnel


    Server side


    In my case for FreeBSD - source :
    zebedee-2.4.1A
    blowfish-0.9.5a
    zlib-1.2.3
    bzip2-1.0.3 we build


    libraries: and actually zebedee: All of the above can also be installed from the ports: we create the server configuration / usr /local/etc/zebedee.conf: start: and get a working server, waiting for incoming connections from the client
    $cd ./blowfish-0.9.5a/
    $make optimize
    $cd ..
    $cd ./zlib-1.2.3/
    $./configure; make
    $cd ..
    $cd ./bzip2-1.0.3/
    $make
    $cd ..


    $cd ./zebedee-2.4.1A/
    $make OS=freebsd
    $make install


    $cd /usr/ports/security/zebedee
    $make install


    server true # работаем в режиме сервера
    serverport 10488 #здесь ожидаем подключения
    ipmode both # работаем как с TCP так и с UDP
    logfile ’var/log/zebedee.log’ # пишем лог
    compression zlib:9 # сжатие zlib максимальное
    detached true # в бекграунд, в виде демона
    verbosity 2
    target 192.168.1.5:3389 # это сервер с RDP


    zebedee -f /usr/local/etc/zebedee.conf


    Client


    We pick up zebedee for Windows and install: C: \ Program Files \ Zebedee.
    To create a connection to the server, we make a 2k3_rdp file with the following contents: For convenience, create a shortcut by specifying in its properties: and run it. You can also configure the launch as a service, more details here It remains to launch the Remote Desktop Connection Client, while specifying the server address 127.0.0. 2 (in XP SP2 it doesn’t work at 127.0.0.1): and see the long-awaited result - the desktop of the server itself.
    verbosity 1
    detached false #наблюдаем все в консоли
    server false # здесь мы как клиент
    compression zlib:9 # используем сжатие zlib
    serverhost ip.address.server.zebedee # адрес сервера, в данном случае шлюз с FreeBSD
    serverport 10488
    tunnel 3389:192.168.1.5:3389 # создаем тоннель для подключения по протоколу RDP к серверу 2k3 (192.168.1.5)


    "C:\program files\Zebedee\zebedee.exe" -f 2k3_rdp




    mstsc /v 127.0.0.2


    Not the end


    Of course, you should not forget about security, for example, keys for identifying clients , or checking addresses .
    You can use zebedee not only for such tasks as shown above. With the help of the tunnel, you can easily organize access to the database, X-server, to almost any resources that use TCP / IP.

    Read Next