the fast, reliable localhost tunneling solution


Tunneling VNC over PageKite

By Bjarni R. Einarsson 2023-06-05, 19:29

There are a few ways to access VNC over PageKite.

The most popular, is to tunnel VNC over SSH, as that encapsulates the VNC traffic in a secure, encrypted tunnel and is directly supported by many VNC clients.

However, if you do not have an SSH server on the remote end (for example if you want to view a Windows desktop over VNC), the following instructions may be helpful.

Configuring the VNC server

The VNC server will need an active PageKite connection. Assuming you are using the Service and the VNC server's PageKite name is vnc.user.pagekite.me, you can add it to your configuration like so:

$ pagekite.py --add 5900 raw:vnc.user.pagekite.me:5900

If you would rather edit the configuration file by hand, add a line like this:

backend=raw/5900:vnc.user.pagekite.me:localhost:5900:SECRET

This sets up a raw listener for port 5900. As the PageKite service front-ends do not actually listen on port 5900 at the moment, this service will only be accessible on a virtual port, exposed by the HTTP Proxy functionality of the PageKite front-end.

Configuring the VNC client

If your VNC client supports it, simply configure it to use vnc.user.pagekite.me:443 as the HTTP proxy.

Connect to vnc.user.pagekite.me on the standard port, 5900.

If your VNC client does not support HTTP proxies, then it may instead have built-in support for establishing SSH tunnels on-demand and connecting over those: this feature can generally be reconfigured to connect over PageKite instead. A script to do just that (on Ubuntu or Debian Linux) may be found in the github repository.

Note that it is possible to connect to the HTTP proxy using TLS, which (if supported by your client) will protect the VNC data stream from casual eavesdropping. The pkvnc script will do this automatically if the required tools (netcat and socat) are installed on your computer.

Comments

  1. Drakester said on 2011-06-28, 13:02
    Broken links above - try

    https://github.com/pagekite/PyPagekite/tree/main/scripts
    Permalink
  2. Bjarni Rúnar Einarsson said on 2011-10-12, 15:10
    Links fixed, thanks!
    Permalink
  3. Chris Dadd said on 2014-04-04, 08:39
    I can't get this to work. I have the following line in my .pagekite.rc
    service_on = raw-5900:@kitename:localhost:5900:@kitesecret

    I have tried using tightvnc viewer from my windows desktop, both to :443, to :5900 and by setting 443 as the proxy (with Ultravnc viewer as I couldn't find the proxy option in tightvnc).

    None work. I'm using the build in httpd on port 80 to show a directory at the moment.

    Any ideas?
    Permalink
  4. Klipus said on 2015-07-14, 11:46
    @Chris Dadd, I also have the same problem with latest version of this script. I can't forward any port excepting HTTP and SSH
    Permalink
  5. SbbKbb said on 2019-05-06, 18:58
    Its not the same but similar. I want to accses DVBViewer server from Kodi over internet. Anyone done it before? Not the web site of DVBViewer,just the 1-2 ports for streamong TV and control

    Thanks
    Permalink
  6. Bjarni Rúnar Einarsson said on 2019-06-22, 15:50
    The public PageKite relays only listen on a limited number of ports. You have to use one of them; the list of available ports should be printed to the log file.

    And remember, PageKite does not stream raw TCP/IP streams. It streams HTTP and TLS, and anything you can bundle inside those. The SSH tunneling for example, is tunneled using a HTTP CONNECT preamble, so only works with SSH clients that know how to do that.

    If you need arbitrary public ports for arbitrary raw data streams, you want a VPN and a public IP address.
    Permalink
  7. Bjarni Rúnar Einarsson said on 2019-06-22, 15:52
    The public PageKite relays only listen on a limited number of ports. You have to use one of them; the list of available ports should be printed to the log file.

    And remember, PageKite does not stream raw TCP/IP streams. It streams HTTP and TLS, and anything you can bundle inside those. The SSH tunneling for example, is tunneled using a HTTP CONNECT preamble, so only works with SSH clients that know how to do that.

    If you need arbitrary public ports for arbitrary raw data streams, you want a VPN and a public IP address.

    (And no, we don't support Python 3 yet. Someday... but Python 2 works and we're not in a hurry. See our latest blog post about the 1.0 release, and our GitHub issues for details.)
    Permalink

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!