By Mr.Siddhant Ughad. In Security Assessment 17 December 2021
How to Access a LAN resource over the Internet?
It is quite fascinating to know what we can do with the help of internet. From booking a flight ticket to hacking the entire systems running the airway. The world of Internet has everything in its arm to offer. While it is known to everyone on how to get an access to the information present over the interconnected network, many don’t know that it is quite possible that you can get access to a LAN resource over the Internet. Here we demonstrate the same using ngrok.
What is ngrok?
Ngrok is a client software that runs a small client process on machine to create a private connection tunnel to the cloud service to pass the machine restrictions that is protected by the firewall. It exposes local servers behind NATs and firewalls to the public internet over secure tunnels.
How It Works?
- Download and run a program on your machine and define the port of a network service running in your local system.
- Program connect to the ngrok cloud service which accepts traffic on a public address.
- Traffic is relayed through to the ngrok process running on our local machine and then on to the local address which we specified.
First we need to install a tool called Ngrok in our system. Ngrok supports almost all major operating systems, you can download them from Ngrok website.
- Head over to the website and then signup for a free account.
- Confirm your email address by clicking on the verification mail send to your registered email id.
- After logging in to our account we are greeted with Ngrok Dashboard.
- Click download and ngrok.zip will be download to our system.
- After download extract the zip file,
In window :Right-clickk and click extract
In Linux : use the following command unzip /pathtodownload/ngrok.zip
- Now open the extracted path in the terminal and paste our Ngrok Auth token
- If success, we will get a confirmation message, please note in windows the command is Ngrok token while in Linux its ./ngrok token
- Now if we want to expose our local webserver port 80 to WAN then we just need to give the command
- ngrok tcp 80
Now if we type the new URLl https://0.tcp.ngrok.io:17388 inthe browser we will be connected to our local web server.
Basically, Ngrok is used for port forwarding and its useful when we have to connect to our system from another system over the internet.
Hope you find it useful. Happy Hacking!
Content here is small and might need some additions. A reference for content expansion could be found here https://www.sitepoint.com/use-ngrok-test-local-site/
Title: How to access a LAN file over the Internet using ngrok
Description: Ngrok helps in bypassing the restrictions put by the firewalls and create a private connection tunnel. Here is how you can ngrok for accessing LAN files remotely.
Mr.Siddhant Ughad. is the Author at qSEAp Infotech pvt. ltd.