replace Hamachi with Neorouter

Image

1#
# I want to SSH to a Raspberry PI that is behind a router
# with no admin access, I cannot setup port forwarding
#
# In the picture,
# client is me, ubuntu 16.04
# nrserver is the thrd-party server ubuntu 16.04
#
# This post is my experience from trying neorouter
# Got it working, but need to buy a third-party linux server
# Cost about $5/year for a cheap NAT, google "low end vps"
# for my test I used a digital ocean server
#
# Could only get it working using old version of neorouter
# http://www.neorouter.com/downloads-oldversion
# check different clients
#
# First create nrserver account at neorouter
# https://secure.neorouter.com/Dashboard/CreateDomain.aspx
# click "Create a Standalone Domain for Free or Pro Editions"


# example

Domain Name: dom678
Password pass678

#### server ubuntu 16.04 32bit ####

wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/Linux/Ubuntu/nrserver-2.3.1.4360-free-ubuntu-i386.deb
dpkg -i nrserver-2.3.1.4360-free-ubuntu-i386.deb

nrserver -setdomain dom678 pass678
reboot#
# reboot was the only way I could get the server to update the ip address
# at neorouter
# check with https://secure.neorouter.com/Dashboard/DomainStatus.aspx

nrserver -adduser user45 dfgyjhgw admin
nrserver -dhcp 10.1.0.0 255.255.255.0
nrserver -showcomputers
#
#############################################################################################################
#### client ubuntu 16.04 32bit ####

wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/Linux/Ubuntu/nrclient-2.3.1.4360-free-ubuntu-i386.deb
dpkg -i nrclient-2.3.1.4360-free-ubuntu-i386.deb

nrclientcmd -d dom678 -u user45 -p dfgyjhgw -register -setconn
#
#
# Please choose from the following option list:
# 1 Create a direct peer-to-peer UDP connection
# 2 Create a direct peer-to-peer TCP connection
# 3 Relay through server
# [1]: 2
#

nrclientcmd -d dom678 -u user45 -p dfgyjhgw

Available Commands: changeview, addcomputer, deletecomputer, createcategory, renamecategory, deletecategory, wakeonlan, setproxy, changepassword, quit

addcomputer
quit

ssh pi@10.1.0.3
#
#############################################################################################################
#### raspberry pi ####

wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/inabox/Raspbian/nrclient-2.3.1.4360-free-raspbian-armhf.deb
sudo dpkg -i nrclient-2.3.1.4360-free-raspbian-armhf.deb

sudo nrclientcmd -d dom678 -u user45 -p dfgyjhgw -register -setconn
sudo nrclientcmd -d dom678 -u user45 -p dfgyjhgw
#
# to uninstall

sudo dpkg -r nrclient
sudo dpkg -r nrserver

#
#############################################################################################################
#### optional install shadowsocks client, make a socks proxy ####
# Guide https://www.linuxbabe.com/raspberry-pi/install-shadowsocks-on-raspbian-and-setup-a-raspberrypi-proxy-server

#

sudo apt-get update
sudo apt-get install python-pip -y
sudo pip install shadowsocks -y

sudo nano /etc/shadowsocks.json

{
"server":"server-ip",
"server_port":8000,
"local_address": "the-ip-address-of-RPi",
"local_port":1080,
"password":"your-password",
"timeout":600,
"method":"aes-256-cfb"
}

# start it
sudo sslocal -c /etc/shadowsocks.json -d start

# I had to add the following to get it working after reboot
sudo nano /etc/rc.local

sudo sslocal -c /etc/shadowsocks.json -d start &