How to connect to Raspberry Shake remotely#

Have you installed the Raspberry Shake at home and would like to access it from your laptop on the road? From the office?

Have you installed the Raspberry Shake in the office or a second home and would like to access it from home?

We recommend using Zero Tier. With ZeroTier, you establish an account where you control access to the configured devices. Then you install the module in your PC or Mac or Linux machine and in the Raspberry Pi(s) and enter the access pw (generated in your master account). It will generate a stable local ip address(es) that give you full remote access to the devices. There are no timeouts, no jumping through hoops for access and access is totally controlled by your local master account.

A good Tutorial can be found below:

ZeroTier#

  1. Register your account at ZeroTier central using this link

  2. Create your network by going here and clicking Create. It is recommended to change the name to something easier to remember

  3. Under IPv4 Auto-Assign, check Auto-Assign from Range and click on an IP range which you know will not conflict with the private IP ranges of any networks you use your devices on (ZeroTier will automatically assign your devices an IP from this range)

  4. Under Access Control, ensure Certificate (Private Network) is checked

  5. Take note of the Network ID

This part of the setup is now complete. Let’s move to the Raspberry Shake:

  1. SSH into the Shake

  2. Run

    $ curl -s https://install.zerotier.com | sudo bash
    
  3. Then execute

    $ sudo systemctl enable zerotier-one
    

    which should output:

    200 info [ID] [version] ONLINE
    
  4. Now, to join the network:

    $ sudo zerotier-cli join [Network ID]
    
  5. Navigate back to your ZeroTier network managing page, reach the Members section, and then select-Authorize the Shake

  6. If required, assign the Shake an easier to remember IP address

  7. Check that your Shake is properly connected using

    $ sudo zerotier-cli listnetworks
    

    which should give:

    200 listnetworks [...] OK PRIVATE [...] [The IP(s) you assigned the Raspberry Pi]/24
    
  8. Lastly, to have your Shake automatically join the ZeroTier virtual network on boot, execute

    $ sudo touch /var/lib/zerotier-one/networks.d/[Network ID].conf
    
  9. Reboot the Shake and the configuration is complete

    $ sudo reboot
    

Note

If you have UFW or any other firewall software installed, ensure that you allow traffic going to and from your private IP range.

Note

To access your ZeroTier virtual network Shake, simply redo the procedure on any computer. It will then be possible to SSH into the Shake from this (or all) device(s) added to the same network.

We have also heard that “Weaved” works well.

Power users can also use vtun. See below for details

vtun#

  1. Install vtun tunneling software server-side:

    $ apt install vtun
    
  2. Configure it. E.g.,

    $ nano /etc/vtun.conf
    

    Example configuration:

    options {
        port 1234;
        timeout 60;
        ip /sbin/ip;
        syslog daemon;
    }
    
    tunel1 {
        password tunel1;
        type ether;
        proto tcp;
        device tap1;
        persist keep;
        keepalive yes;
        encrypt yes;
        compress no;
        up {
           ip "li set %% up";
          ip "addr add 10.18.197.5/30 dev %%";
           };
        down {
           ip "li set %% down";
           };
    

    This will create a single tunnel. The IPs and configuration should be tailored to your network and needs.

  3. Now on the Raspberry Shake, edit vtund.conf

    $ nano /etc/vtund.conf
    

    Example configuration:

    options {
      port 1234;
      timeout 60;
      ip /sbin/ip;
    }
    
    tunel1 {
        password tunel1;
        type ether;
        proto tcp;
        device tap1;
        keepalive yes;
        persist keep;
        encrypt yes;
        compress no;
        up {
           ip "li set %% up";
          ip "addr add 10.18.197.6/30 dev %%";
           };
        down {
           ip "li set %% down";
           };
    }
    
  4. Enable vtun so that it comes up at boot:

    $ nano /etc/default/vtun
    

    Example configuration:

    CLIENT0_NAME=tunel1
    
    CLIENT0_HOST=ipvtunserver o dns (aquí deben colocar el ip público del servidor de vtun o el nombre dns)
    
  5. Restart the Raspberry Shake

  6. Confirm that the tunel is up server-side:

    $ ps axx | grep vtun
    

    or

    $ ifconfig | grep tap1