Follow Us on WhatsApp | Telegram | Google News

Share Large Files Over the Internet for Free via CMD in 2 Easy Steps

Table of Contents

Share file over Internet via CMD
In today's world, we primarily use technology in our daily life including our professional office life also. In these, we regularly need to share data from others or from our devices. What if you are on vacation or situation where you need to access your laptop computer for files and data, but you can't get the files?

In this scenario, your important work may get hampered or fail to complete the task, and this is just because you don't have the required data.

Here we will show you an easy and secure way to share your files over the internet which you can access from anywhere. 

We do know that technology is developing rapidly and there are lots of ways to share your files and data with each other. Other than this you can also opt for cloud storage but to note there are some restrictions on data size. Some popular cloud storage does offer free space but with limitations as Google Drive offers 15GB per account and One Drive gives 5GB of space. 

To easily share your files over the internet, we will use the NGROK application. If you are not familiar with NGROK, then here is a brief description of it.

Daniel Miessler nicely defines NGROK, its features, and its uses-

Ngrok is an application that gives you external (internet) access to your private systems that are hidden behind NAT or a firewall. It’s basically a super slick, encrypted TCP tunnel that provides an internet-accessible address that anyone can get to, and then links the other side of that tunnel to functionality running locally.

Steps to Access local Data or Files over the Internet

  1. Visit the NGROK website and signup for a free new account. (You can skip signup if you already have an account).
  2. Login to your NGROK account
    1. Downloads NGROK client (if Windows just click on "Download for Windows")
    2. Open NGROK client.
    3. Now scroll down and look for your auth token to connect your account. 
    4. Copy your auth token code, paste it on the NGROK terminal, and hit Enter.
    5. ngrok config add-authtoken 2DiDYHi7UiHBjOEz8HA7Eg9BcVy_4JhCmNJ5nsC6qLnby6K1E
  3. After pressing enter, you will get the following message 
  4. Authtoken saved to configuration file: C:\Users\NAME\AppData\Local/ngrok/ngrok.yml
  5. Now type the following command on the NGROK terminal
  6. ngrok http "file:///PATH OF YOUR FILE/FOLDER" 

    This command will make your data or particular file/folder accessible online by proving the tunnel URLs to your local drive files. As you click ENTER, NGROK will give you a web URL (tunnel URL ) to access your file through a web browser like https://ecc9███████████████████ -> file:///E:%5Cck

Anyone who can guess your tunnel URL can access your local web server unless you protect it with a password.

Add security Authentication on NGROK URL

With the command on Step 4, you find that anyone can easily access your shared files/folder if the tunnel URL provided by NGROK know by another person.  For the security of your file/folder, there must be an authentication while accessing the tunnel URL. 

You can add authentication on your NGROK URL tunnel to prevent unauthorized access to your files or data with the --basic-auth flag. This enforces HTTP Basic Auth on all requests with the username and password you specify as an argument.

You can make your tunnels secure with the --basic-auth flag. You can include multiple --basic-auth flags to allow multiple users.

We recommend to use the following command in place of Step 4.

ngrok http "file:///PATH OF YOUR FILE/FOLDER" --basic-auth="username:password" 8080

Here in "username:password" you can add anything you like in Username and your own Password.

So with the above tutorial, now you can share and access your files or data from anywhere in a secure way.  Hope you like this tutorial, also check the video guide for the same for a better understanding.

Video Guide

Bonus Tips for NGROK URL

As you see that the tunnel ULR provided by the NGROK is long and in alpha-numeric hash type format which is quite difficult to remember. So to resolve this you can use any URL shorteners to make your tunnel URL short and rememberable. 

Read Also
Post a Comment