[SOLVED] Need Help regarding the port forwarding using mobile hotspot

You can use the ‘Serveo.net’ service. It converts your localhost to a dedicated URL. You can use that URL over WAN to access your localhost. Many users tested on Kali Linux which was connected to a mobile hotspot.

  • You don’t have to worry about Static IP/Dynamic IP etc.

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.


You 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

Conclusion

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!

3 Likes