OS of my PC is Ubuntu 16.10
First install ngrok on the the PC Please refer the official web site
signup to an account
Extract the downloaded zip file in to the home directory of the PC
Then connect your account using the authtoken shown in the web site ( for having longer sessions )
On the Ubuntu terminal and enter
./ngrok authentic xxxxxx
( Use your authtoken got in the ngrok web site instead of xxxxxx above )
Figure:-1 The web panel of ngrok
On Ubuntu terminal run
./ngrok http 80
When you run ./ngrok http 80 you will get the ngrok panel as follows
Figure:-2 ngrok running on the terminal
Figure:-3 ngrok web interface
If you copy the Forwarding web links on the web browser of a remote computer ,local host of the forwarding computer will appear on the screen.
The main problem in the free ngrok is ,the forwarding link is not a fixed one .Every time you start ngrok ,you will get a different link address .Therefore you can not access the localhost of the computer ,without knowing the forwarding address .
If you can save the ngrok web interface as a pdf file and upload in to a free dropbox account ,you will be able to access it over the internet and connect with the link .
Therefore it is necessary to install dropbox on the hosting computer.Installation of dropbox can be easily done using the Ubuntu Software center .
wkhtmltopdf is installed for saving html files as pdf
sudo apt-get install wkhtmltopdf
In order to start dropbox , ngrok at the startup of the PC and saving ngrok forwarding links to dropbox and uploading to the cloud automatically , I have written a script shown below
Open the terminal and run
sudo gedit testngrok.sh
Copy the following script in to the testngrok.sh and save the file in the home directory
#!/bin/bash dropbox start -i gnome-terminal -- ./ngrok http 80 xdg-open http://127.0.01:4040/inspect/http rm ~/Dropbox/Public/ngrok/* sleep 20 wkhtmltopdf http://127.0.01:4040/inspect/http ~/Dropbox/Public/ngrok/ngrok.pdf
Then to make executable testngrok.sh run on th terminal
chmod +x ~/testngrok.sh Now if you run ./testngrok.sh on the terminal ,dropbox and ngrok will start and the forwarding links are uploaded to the dropbox cloud. If you want to start the above process at the startup of PC ,the script has to be added in to the startup applications . Figure:-4 Adding the script to the menu launcher Figure:-5 Adding the script to the startup applications When you start the computer the above script will activate automatically and save the forwarding links in the dropbox cloud so that the localhost can be accessed remotely. Figure:-6 Saved forwarding links file on the dropbox folder of the local computer Figure:-7 Saved forwarding links in the dropbox cloud If you place the cursor and press on the link you will be able to access the local host of the forwarding computer