OS of my PC is Ubuntu 16.10
First install ngrok on the the PC Please refer the official web site
Extract the downloaded zip file in to the home directory of the PC
Now if you run ./ngrok http 80 you will get the ngrok panel as follws
ngrok running on the terminal
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
dropbox start -i
gnome-terminal -e ‘./ngrok http 80 ‘
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 . Adding the script to the menu launcher 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. Saved forwarding links file on the dropbox folder of the local computer 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