INTRO
Recently I found a tool named “PageKite”. After using it for a while, I can say that it is a very great tool to perform port forwarding(Port 80 mainly). There are many methods to forward a port or service from a local network to a public network. It is a very awesome way to host your website on your computer and to access it via a public domain that will be provided by the tool or the router(in case you are using it) whatever you are using. well, not just this. you can even forward other ports such as ssh port 22 which makes your computer accessible from anywhere.
In this tutorial, We will compare Ngrok and PageKite. We will test both to find out which one is better. I am working on a python script that will be able to send a file to a remote server. For example, if you use AWS windows or Linux, I am pretty sure that you must have had a problem to share the files from your PC to the AWS. the script will solve the problem for you. But in this article, you will learn it to do it manually.
But before going more further, I would love to suggest to you my previous articles for a better understanding of this article.
ATTACK
Ngrok
let’s talk about Ngrok first which is very famous when it comes to port forwarding. Installation of this tool is very easy. You can download the binary file from its website.
After downloading, extract the file and you will need to provide an authentication token that you will get by creating an account on Ngrok.
When you get your authentication token. Type this command:
./ngrok authtoken <YOUR_AUTH_TOKEN>
It will save your token in ~/.ngrok2/ngrok.yml
Screenshot:
you can it to forward Any TCP port. it has a lot of cool function but most of all are paid. but the best thing about Ngrok is that you can forward any other service port along with HTTP. for example, you have SSH port opened on your PC. now your friend wants to access it. That’s where the Ngrok will take part to forward the 22 port to make it available for your friend.
Type this command to forward Port 22:
./ngrok tcp 22
Screenshot:
you can Ngrok to forward HTTP/HTTPS ports. Type this command to forwarding HTTP port:
Screenshot:
Before visiting the Ngrok link, be sure to check if the apache2 service is running on your server or not. Type this command to start the apache2 server:
service apache2 start
Now, let’s check the Ngrok link:
The best thing about Ngrok is its web panel. it starts a web panel whenever you forward a port. it doesn’t matter if you are forwarding TCP or HTTP.
PageKite
PageKite is another nice method of port forwarding. but nice only for HTTP. it can forward other TCP ports but it can be complicated a little bit. so, I would not recommend you to use this to forward any other port except HTTP/HTTPS.
PageKite is available for Windows/Linux/Mac. I am using Kali Linux here. You can visit the download page if you are not using Kali Linux.
But if you are using Kali Linux, type this command to install PageKite:
apt install pagekite
Screenshot:
Now you will need to sign up with your email account. type this command:
pagekite --signup
You can even use a temporary mail. but always remember the name of the account(the string before @).
Now, let’s start our apache server on our localhost:
service apache2 start
if you want to forward the port 80 with PageKite, type this command:
pagekite 80 <yourname.pagekite.me>
your name is the name that you used while sign-up. For example, it is luckythandel
for me. so, the command would be:
pagekite 80 luckythandel.pagekite.me
Screenshot:
and if we try to visit the link: luckythandel.pagekite.me
. you will see that you are being redirected to the HTTPS. and it is a good thing.
You can use a directory without even running the apache2. for example, you want to host your Desktop on PageKite without starting any apache server, Type this command:
pagekite /root/Desktop/ luckythandel.pagekite.me
you can use --add
to run all processes in the background. Type this command:
pagekite --add 80 luckythandel.pagekite.me
Screenshot:
use --list
to list all kites:
pagekite --list
Screenshot:
To remove a kite, use –remove:
pagekite --remove luckythandel.pagekite.me
I will not suggest PageKite to forward any other port except HTTP. but works very great with HTTP. What I think is, you can use Pagekite for web hosting. and the Ngrok for other TCP port forwarding. but both of these tools work very well.
Thanks For Visiting.
Hello, I am trying to setup a proxy server from my pc, and then exposing it via Pagekite. but it doesn’t work like Ngrok! In Ngrok i get the domain & port. but in Pagekite i get only the MYNAME.pagekite.me. Even tried your command above pagekite 80
What should i do ?