Access your Ubuntu device from the Web

Make your Ubuntu device accessible from anywhere via the Yaler relay.

Prerequisites

Setting up your device requires a relay domain. Please sign up to get one.

Setting up the hardware

Make sure the Ubuntu device is connected to the Internet via Ethernet, Wi-Fi or 3G.

Installing YalerTunnel on Ubuntu

Follow these steps to install YalerTunnel on Ubuntu.

  1. Open a shell on your device (default login is ubuntu, empty password), or type
    $ cd ~
  2. Update apt-get with
    $ sudo apt-get update
  3. Download and install libssl with
    $ sudo apt-get install libssl-dev
  4. Create a yalertunnel directory
    $ mkdir yalertunnel
    $ cd yalertunnel
  5. Download, unzip and build the YalerTunnel source
    $ wget http://s3.yaler.net/yalertunnel/YalerTunnel2.src.tar.gz
    $ tar xfzmv YalerTunnel2.src.tar.gz
    $ ./configure && make
  6. To check the installation, display the YalerTunnel version and usage with
    $ ./yalertunnel
  7. Done. Now either enable Web access or SSH access or VNC access.


Web access

Prerequisites

A Web server or service has been installed and is running on the Ubuntu device.

Enabling Web access on Ubuntu

How to configure YalerTunnel on your Ubuntu device to make a local Web service accessible from anywhere.

  1. Download the yalertunnel yalertunnel.service script
    $ sudo wget -O /lib/systemd/system/yalertunnel.service http://s3.yaler.net/ubuntu/yalertunnel.service
  2. Open the yalertunnel.service script with
    $ sudo nano /lib/systemd/system/yalertunnel.service
    Check the path (default: /home/pi/yalertunnel), set the port of the local SSH service (default: 80), and set your relay domain
    1 [Unit]
    
    5 WorkingDirectory=/home/ubuntu/yalertunnel
    6 ExecStart=/home/ubuntu/yalertunnel/yalertunnel server 127.0.0.1:80 try.yaler.io RELAY_DOMAIN -min-listeners 1

    Save changes with CTRL-X, then Y, then RETURN. Do not change the local IP (default: 127.0.0.1), unless the SSH service runs on a separate device in the same network.

  3. Enable and start yalertunnel.service
    $ sudo systemctl daemon-reload
    $ sudo systemctl enable yalertunnel.service
    $ sudo systemctl start yalertunnel.service
  4. Reboot your Ubuntu device
    $ sudo reboot
  5. Done. Now access your device from any Web browser or with Curl or from iOS or from Android (and resolve errors).

Disabling Web access on Ubuntu

How to remove YalerTunnel to disable Web access from anywhere.

  1. Open a shell on your Ubuntu device and type
    $ sudo systemctl stop yalertunnel.service
    $ sudo rm /etc/systemd/system/multi-user.target.wants/yalertunnel.service
    $ sudo rm /lib/systemd/system/yalertunnel.service


SSH access

Prerequisites

The SSH daemon sshd is running on the Ubuntu device.

Enabling SSH access on Ubuntu

How to configure YalerTunnel on your Ubuntu device to allow SSH access from anywhere.

  1. Download the yalertunnel yalertunnel-ssh.service script
    $ sudo wget -O /lib/systemd/system/yalertunnel-ssh.service http://s3.yaler.net/ubuntu/yalertunnel-ssh.service
  2. Open the yalertunnel-ssh.service script with
    $ sudo nano /lib/systemd/system/yalertunnel-ssh.service
    Check the path (default: /home/ubuntu/yalertunnel), set the port of the local SSH service (default: 22), and set your relay domain
    1 [Unit]
    
    5 WorkingDirectory=/home/ubuntu/yalertunnel
    6 ExecStart=/home/ubuntu/yalertunnel/yalertunnel proxy 127.0.0.1:22 try.yaler.io RELAY_DOMAIN

    Save changes with CTRL-X, then Y, then RETURN. Do not change the local IP (default: 127.0.0.1), unless the SSH service runs on a separate device in the same network.

  3. Enable and start yalertunnel-ssh.service
    $ sudo systemctl daemon-reload
    $ sudo systemctl enable yalertunnel-ssh.service
    $ sudo systemctl start yalertunnel-ssh.service
  4. Reboot your Ubuntu device
    $ sudo reboot
  5. Done. Now access your device with Putty or with SSH (for Linux, Mac OS X).

Disabling SSH access on Ubuntu

How to remove YalerTunnel to disable SSH access from anywhere.

  1. Open a shell on your Ubuntu device and type
    $ sudo systemctl stop yalertunnel-ssh.service
    $ sudo rm /etc/systemd/system/multi-user.target.wants/yalertunnel-ssh.service
    $ sudo rm /lib/systemd/system/yalertunnel-ssh.service


VNC access

Prerequisites

A VNC service has been installed and is running on the Ubuntu device.

Enabling VNC access on Ubuntu

How to configure YalerTunnel on your Ubuntu device to allow VNC access from anywhere.

  1. Download the yalertunnel yalertunnel-vnc.service script
    $ sudo wget -O /lib/systemd/system/yalertunnel-vnc.service http://s3.yaler.net/ubuntu/yalertunnel-vnc.service
  2. Open the yalertunnel-vnc.service script with
    $ sudo nano /lib/systemd/system/yalertunnel-vnc.service
    Check the path (default: /home/ubuntu/yalertunnel), set the port of the local VNC service (default: 5901), and set your relay domain
    1 [Unit]
    
    5 WorkingDirectory=/home/ubuntu/yalertunnel
    6 ExecStart=/home/ubuntu/yalertunnel/yalertunnel proxy 127.0.0.1:5901 try.yaler.io RELAY_DOMAIN

    Save changes with CTRL-X, then Y, then RETURN. Do not change the local IP (default: 127.0.0.1), unless the VNC service runs on a separate device in the same network.

  3. Enable and start yalertunnel-vnc.service
    $ sudo systemctl daemon-reload
    $ sudo systemctl enable yalertunnel-vnc.service
    $ sudo systemctl start yalertunnel-vnc.service
  4. Reboot your Ubuntu device
    $ sudo reboot
  5. Done. Now, see how to access your device with VNC.

Disabling VNC access on Ubuntu

How to remove YalerTunnel to disable VNC access from anywhere.

  1. Open a shell on your Ubuntu device and type
    $ sudo systemctl stop yalertunnel-vnc.service
    $ sudo rm /etc/systemd/system/multi-user.target.wants/yalertunnel-vnc.service
    $ sudo rm /lib/systemd/system/yalertunnel-vnc.service


Troubleshooting

How to fix common issues.


To enable Web and SSH or VNC access at the same time, or tunnel another protocol, please get in touch.


Creative Commons License This work by Yaler GmbH is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.