Access your Debian device from the Web

Make your Debian 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 device is connected to the Internet via Ethernet, Wi-Fi or 3G.

There are device-specific Yaler tutorials for Debian on BeagleBone, CHIP, CuBox, Orange Pi, Red Pitaya and Raspberry Pi.

Installing YalerTunnel on Debian

Follow these steps to install YalerTunnel on Debian.

  1. Open a shell on your device (non-root login, we use debian), or type
    $ cd ~
  2. Get root priviledge (using the root password) with
    $ su
  3. Update apt-get with
    $ apt-get update
  4. Download and install libssl and ca-certificates and gcc with
    $ apt-get install libssl-dev ca-certificates
    $ apt-get install build-essential
  5. End root priviledge with
    $ exit
  6. Create a yalertunnel directory
    $ mkdir yalertunnel
    $ cd yalertunnel
  7. Download, unzip and build the YalerTunnel source
    $ wget http://s3.yaler.net/yalertunnel/YalerTunnel2-v2.3.2.src.tar.gz
    $ tar xfzmv YalerTunnel2-v2.3.2.src.tar.gz
    $ make
  8. To check the installation, display the YalerTunnel version and usage with
    $ ./yalertunnel
  9. Done. Now either enable Web access or SSH access.


Web access

Prerequisites

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

Enabling Web access on Debian

How to configure YalerTunnel on Debian to make a local Web service accessible from anywhere.

  1. Get root priviledge (using the root password) with
    $ su
  2. Download the yalertunnel.service startup script
    $ wget http://s3.yaler.net/debian/yalertunnel.service -O /lib/systemd/system/yalertunnel.service
  3. Create a symbolic link
    $ ln -s /lib/systemd/system/yalertunnel.service /etc/systemd/system/multi-user.target.wants/yalertunnel.service
  4. Open the yalertunnel.service script with
    $ nano /lib/systemd/system/yalertunnel.service
    Check the path (default: /home/debian/yalertunnel), set the port of the local Web service (default: 80), and set your relay domain
    1 [Unit]
    
    7 ExecStart=/home/debian/yalertunnel/yalertunnel server 127.0.0.1:80 try.yaler.io:80 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 Web service runs on a separate device in the same network.

  5. Reboot your device to run the script
    $ reboot
  6. 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 Debian

How to remove YalerTunnel to disable Web access from anywhere.

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


SSH access

Prerequisites

Make sure the SSH daemon sshd is running on the Debian device.

Enabling SSH access on Debian

How to configure YalerTunnel on Debian to allow SSH access from anywhere.

  1. Get root priviledge (using the root password) with
    $ su
  2. Download the yalertunnel-ssh.service startup script
    $ wget http://s3.yaler.net/debian/yalertunnel-ssh.service -O /lib/systemd/system/yalertunnel-ssh.service
  3. Create a symbolic link
    $ ln -s /lib/systemd/system/yalertunnel-ssh.service /etc/systemd/system/multi-user.target.wants/yalertunnel-ssh.service
  4. Open the yalertunnel-ssh.service script with
    $ nano /lib/systemd/system/yalertunnel-ssh.service
    Check the path (default: /home/debian/yalertunnel), set the port of the local SSH service (default: 22), and set your relay domain
    1 [Unit]
    
    7 ExecStart=/home/debian/yalertunnel/yalertunnel proxy 127.0.0.1:22 try.yaler.io:80 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.

  5. Reboot your device to run the script
    $ reboot
  6. Done. Now access your device with Putty or with SSH (for Linux, Mac OS X).

Disabling SSH access on Debian

How to remove YalerTunnel to disable SSH access from anywhere.

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


Troubleshooting

How to fix common issues.


To enable Web and SSH 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.