Hold Tight...

0 %
Warith AL Maawali
Driving cybersecurity excellence
Innovator behind Linux Kodachi
  • Residence:
    ::0
  • Uptime Binary:
    101110
  • Mantra:
    Innovate, Secure, Repeat
ONS
EEDS
NSSG
Visual basic
Gambas
PHP
Delphi
Bash
  • Cybersecurity
  • Generative AI
  • Cloud & Automation
  • Cryptocurrency

Setting up VNC repeater on Linux

27/05/2014

Setting Up Your Repeater for VPN Sessions

You may be familiar with how TeamViewer works; it can operate behind almost any firewall or NAT. The secret is that both the client and server do not contact each other directly but through a repeater owned by the company, allowing the client and server to initiate a reverse connection to the repeater. If you are concerned about having a third party involved in your VPN sessions, I will explain in this blog how to set up your own repeater on Linux. For Windows, the process is straightforward.

The software used to achieve this is UltraVNC, which is free and open-source. The package contains a client, server, and repeater.

vnc repeater setup
VNC repeater setup

Repeater setup on the Debian node: 

ShellScript
# Make sure you have a static IP on your node

# Update your node:

apt-get update
apt-get upgrade

# Get some packages:

apt-get install nano x-window-system-core x-window-system libxtst6 psmisc build-essential 
apt-get install libx11-6 libx11-dev 

# Download the repeater source into /usr/local/src

cd /usr/local/src
wget http://www.wisdomsoftware.gr/download/uvncrep017-ws.tar.gz

# Extract the source file

gunzip uvncrep017-ws.tar.gz
tar -xvf uvncrep017-ws.tar

# Install

cd uvncrep017-ws
make; make install;

# Add a user for the service you can change this on config file

useradd uvncrep

# Edit configuration to suit your needs for me I only changed ports + allowedmodes = 2

nano /etc/uvnc/uvncrepeater.ini

# Start the service

/etc/init.d/uvncrepeater start 
# or 
service uvncrepeater start

# Stop the service

/etc/init.d/uvncrepeater stop 

# To moniter the logs:

tail -f /var/log/uvncrepeater.log  

# To test your server:

winvnc.exe -id:424 -repeater IP_Number::Repeater_Port -run

# To encrypt the traffic change the following settings on ultravnc.ini and make sure you generate your key rc4.key

UseDSMPlugin=1
DSMPlugin=MSRC4Plugin_for_sc.dsm

# To run it as service change the following settings on ultravnc.ini

service_commandline=-autoreconnect -id:Your_custom-ID_Number -connect IP_Number::Repeater_Port
ShellScript
Download UltraVNC

Posted in Tech BlogTags:
© 2024 Warith AL Maawali. All Rights Reserved.
Stay Secure, Stay Assured.