Create a new Xshell Profile

  • New Connection
  • Name: yourserver
  • Host: yourserveripdomain
  • Port: your ssh port

Authentication:

  • public Key
  • Username: yourusername
  • Userkey: youruserkey

SSH > Tunneling > Add

  • Type Direction: Local (Outgoing)
  • Source Host: Localhost
  • Listening Port: 3400
  • Destination Host: Localhost (for rdp host or ip of machine inside ssh network)
  • Destination Port: 3389
  • Description: Remote Desktop SSH Tunnel

Now connect to rdp server via ssh network

  • Run Ctrl + R and mstsc.exe -v localhost:3400

Notice either setup a sshd server on the windows server or have a linux server inside your network with sshd running and that has port open

  • apt-get remove golang --purge
  • wget https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz
  • sudo tar -zxvf go1.7.*.linux-amd64.tar.gz -C /usr/local
  • echo 'export GOROOT=/usr/local/go/bin/go' >> ~/.bashrc
  • echo 'export GOPATH=$HOME/go' >> ~/.bashrc
  • echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc

compile something

  • go get github.com/ncw/rclone
  • go get github.com/mholt/caddy/caddy
  • $HOME/go/bin/rclone help
  • $HOME/go/bin/caddy -h

Computer Hope

Compile Partclone

  • sudo eopkg it -c system.devel
  • sudo eopkg it e2fsprogs-devel ntfs-3g ntfs-3g-devel btrfs-progs btrfs-progs-devel ncurses-devel
  • mkdir build && cd build
  • wget https://github.com/Thomas-Tsai/partclone/archive/0.2.89.zip
  • unzip 0.2.89.zip && cd partclone*
  • ./configure --enable-ncursesw --enable-btrfs --enable-exfat --enable-fat --enable-ntfs --enable-extfs --enable-hfsp --enable-minix --prefix=/usr/
  • make -j4
  • sudo make install

using Partclone.dd (Full Backup & Restore using dd mode )

  • lsblk
  • sudo partclone.dd -s /dev/device -o /home/backups/device.img (Backup drive to file)
  • sudo partclone.dd -s /home/backups/device.img -o /dev/device (Restore file to drive)

explain Partclone

  • show ncurses progress = -N
  • source file or device = -s
  • output file or device = -o
  • set buffer size = -z 4096 (useful for raspberry pi)

using Partclone (Partition Backup & Restore)

todo

  • apt-get install golang (Ubuntu)
  • sudo eopkg it golang (Solus)
  • export GOPATH=/$HOME/go/
  • go get github.com/ncw/rclone
  • sudo install $HOME/go/bin/rclone /usr/bin
  • rclone config
  • rclone copy /home/user/ b2:user-backup
  • rclone copy --exclude=/home/node/exclude/* /home/node/ b2:user-backup/node (to exclude folder)

Tinc VPN 1.1pre14 on Windows
with windows client (repeat client step to add more clients)

Firewall open firewall port 655 on your router

Install Tinc VPN

Download & Install Tinc 1.1pre14

Configure master node (master)

Ctrl + R then C:\Program Files\tinc & Enter
Click on File > Open Command Prompt as Administrator

  • tinc -n vpn init master
  • tinc -n vpn add subnet 20.0.0.1
  • tinc -n vpn add address=public.domain-or-ip

setup ethernet interface

  • cd tap-win64
  • addtap.bat
  • cd ..
  • netsh interface ipv4 show interfaces locate the one thats disconnected probably Ethernet 2
  • netsh interface set interface name = "Ethernet 2" newname = "tinc"
  • netsh interface ip set address "tinc" static 20.0.0.1 255.255.255.0
  • netsh interface ipv4 show config now you should have a tinc interface with ip/subnet

Configure client node (client1)

if you want to add more clients, change name and ip

Download & Install Tinc 1.1pre14

Ctrl + R then C:\Program Files\tinc & Enter
Click on File > Open Command Prompt as Administrator

  • tinc -n vpn init client1
  • tinc -n vpn add connectto master
  • tinc -n vpn add subnet 20.0.0.2

setup ethernet interface

  • cd tap-win64
  • addtap.bat
  • cd ..
  • netsh interface ipv4 show interfaces locate the one thats disconnected probably Ethernet 2
  • netsh interface set interface name = "Ethernet 2" newname = "tinc"
  • netsh interface ip set address "tinc" static 20.0.0.2 255.255.255.0

copy the files/keys

  • on client1 machine, copy the vpn/hosts/client1 file to yourvpn/hosts folder on your master machine
  • on master machine, copy the vpn/hosts/master file to your vpn/hosts folder on your client1 machine

test it with

Router

  • tincd -n vpn -D -d3
  • ping 20.0.0.2 (after both is up!)
  • issues, disable your firewall, open port 655..

Client1

  • tincd -n vpn -D -d3
  • ping 20.0.0.1 (after both is up!)
  • issues, disable your firewall, open port 655..

Run as daemon (on both router and client)

Router:
tincd -n vpn

Client
tincd -n vpn

Tips

  • ping 20.0.0.1 from client1
  • ping 20.0.0.2 from master
  • try opening windows share \\20.0.0.1 from client1
  • try opening windows share \\20.0.0.2 from master
  • try remote desktop, ftp, etc to check if it works
Easily deploy an SSD cloud server on @DigitalOcean in 55 seconds. Sign up using my link and receive $10 in credit
Proudly published with Ghost | Theme based on Draugur | Header Image by GUWEIZ@DeviantArt
Creative Commons Licence