I recently faced a problem where I was trying to share files with my friends but I couldn’t do so cause 1. my Google drive was full and 2. I didn’t want to pay for extra space.
After doing my online research I saw a solution where I could setup ngrok and enable apache server and service and then shorten then link and share the link with my friends and I must say it worked as a charm and I just performed the following simple steps as show below;
Step 2: the second step is to download ngrok, once signed in you will see a button for download click on it if you are using Linux but there other options for other operating systems e.g mac and windows. If your using a different OS select your OS and download ngrok.
Step3: once you have downloaded ngrok the next step is to navigate to the zip file and unzip it, you can also extract the file using 7zip using 7z e <name of file>.
Once extraction has finished a file would appear which looks like a gear
Step 4: After extracting ngrok file, you go to the root directory and type the command nano .ngrok2, and once that’s done you take your authentication key which is provided by ngrok copy paste authtoken xxxxxxxxxx to the file and save it.
Note: you must copy starting from the word authtoken then space then followed by your token
Step 5: the next step would be to allow port forwarding on your machine by running the ngrok file which you had extracted from the zipped file by typing ./ngrok http 80 as shown in the below image.
Step 6: After finishing with port forwarding we have to enable and start the Apache server and service.
root@kali:~ systectl enable apache2 – to enable Apache
root@kali:~ service apache2 start – to start Apache server
Once Apache is up and running you change directory to the web directory /var/www/html and paste the file you want to share with your friends there but apart from that you will have to delete or disable index.html file found in the web directory
Step 7: Finally you copy the https link and then you paste in bitly.com, where you paste the link and click on the shorten link button then you copy the link which has been shortened and send it to your friends to download the file.