User Tools

Site Tools


tunneling_with_dreamcompute

This is an old revision of the document!


Tunneling with DreamCompute

These steps set up remote access to a home network using an ssh tunnel to a DreamCompute host.

  1. Create a DreamCompute instance (default parameters OK).
  2. On home UNIX server, create a key pair and upload the public key for access to the instance.
  3. Edit /etc/ssh/sshd_config and add this at the end:
    ClientAliveInterval 30
    ClientAliveCountMax 3
    
    Match User ubuntu
        GatewayPorts yes
  4. Edit the Access & Security settings:
    Manage Rules
    Add Rule: Custom TCP Rule, Ingress, Open Port 12345 (for example), Remote CIDR = 0.0.0.0/0.
  5. Create an A-type DNS record for the DreamCompute IP address with a name like casa.example.com.
  6. To create and test the tunnel use the command below on the home server, then try to connect to port 12345 on casa.example.com.
    $ ssh -NR '*:12345:192.168.1.123:54321'
  7. On home server, create a ~/.ssh/config file with something like this…
    Host tunnel
    HostName casa.example.com
    User ubuntu
    IdentityFile ~/.ssh/cloud.key
    BatchMode yes
    EscapeChar none
    RemoteForward *:9190 192.168.1.190:2190
    RemoteForward *:9191 192.168.1.191:2191
    RemoteForward *:9999 192.168.1.192:2222
  8. Add this line to crontab:
    @reboot autossh -N tunnel
tunneling_with_dreamcompute.1489191717.txt.gz · Last modified: 2017/03/10 16:21 by jtkorb