How can you expect to get to the next level if you can't port forward?
That's what you are gonna get if you tell anyone professional that you don't have a router.
So, That's it? my journey ends here?
Real learners are those who can't be stopped by any obstacle. They always find a way to get through it. And if you are here, then you are a real learner!
So, how can we port forward without a router?
The solution is simple. This method is also used by professional hackers to remotely hack devices over WAN. You can host your local server over WAN too.
The service is called Serveo.net which can be used to port forward from your Android device or PC(Obviously you will need an interface like termux on your Android device). This service uses SSH to forward TCP ports. The best thing about Serveo is, in order to use it doesn't require any installation or signup.
Let's see how we can configure it for Port forwarding.
Using Serveo to port forward on Kali Linux
Fire up your Kali Linux machine and open up the terminal. Here we have an Apache2 local web server and we want to host it over WAN. If you have an apache local server too, run it by the command service apache2 start.
Now its time to host the server over WAN. Simply copy the command from below.
ssh -R port:localhost:port serveo.net
Replace the port and localhost with your port number and local IP address. Now hit enter and you will get a custom URL from Serveo. That's it! you can now access your server from outside your network through that URL.
And the below screenshot from an Android device outside the network.
If you don't like the subdomain or it doesn't look genuine, you can set a custom name according to your choice. To do that, simply give the command ssh -R subdomain:port:localhost:port serveo.net. It will give you a new subdomain.
Here you can see in the screenshot, we got a new subdomain.
Basic commands for advance use:
Request multiple tunnels at once: ssh -R 80:localhost:8080 -R 80:localhost:9999 serveo.net
Keep the connection alive: ssh -o ServerAliveInterval=90 -R 80:localhost:8888 serveo.net
Reconnect automatically: autossh -M O -R 80:localhost:8888 serveo.net
There are so many students out there who don't have a router or can't afford a good router. Port forwarding is very important in the field of Ethical Hacking or Penetration testing. You can't go to the next level if you can't port forward.
These methods or services help people like you or like us. Also, don't underestimate this service. These are used by professional hackers too! Why? well, guess!
What's your opinion? Let us know in the comment box.