This blog is NOT OFFICIAL website of Kali Linux. We just share Tutorials to learn Cybersecurity.

Free Port Forwarding without Router


Previously, in our some articles like, SSH port forwarding and Portmap we discussed that how we can use port forwarding without router, and access our localhost site on the internet. In our this article we are going to cover another method to forward port without router.

Why we need this? specially when we have router and we use static IP or using NO-IP services.

This is a very good question. Well, we are in cybersecurity field where anonymity matters a lot. In real world during penetration testing smart attackers didn't use routers and static IP. It increase chances to get traced. Port forwarding using SSH or tunnels also might be traces (not fully anonymous) but it will be a little bit tough. So we can use VPN, proxychains and TOR to get anonymous.

Free Port Forwarding without Router Kali Linux
Now coming to the article, in this tutorial we are going to use localtunnel service. Using this service is very easy, we don't need to mess with DNS and firewall settings.

Installing localtunnel on Kali Linux

We can easily install localtunnel using Node Package Manager. So, we need to install Node Package Manager (npm) on our Kali Linux or any other Debian based Linux distribution. We use following command to do this:

sudo apt install npm

Because localtunnel uses Node JS that because we need to install npm. This will install some packages and complete the process in couple of minutes, dependig on our system performance and internet speed.

installing npm on kali linux

After installing npm we use this package manager to install localtunnel. We use following command to install localtunnel:

sudo npm install -g localtunnel

In the following screenshot we can see that localtunnel installed on our system in some seconds.

installing localtunnel using node package manager

Port Forwarding using LocalTunnel

We have installed localtunnel on our system. Now we just need to forward our localhost on the internet.

Here we have a localhost service running on our localhost using apache2. This is a simple webpage for showing an example.

sample webpage on running on localhost
sample webpage on running on localhost
This is running on our port 80, so we need to forward our port 8- using localtunnel to access our localhost on the internet.

A very tiny command will do this,

lt --port 80

We just put lt for localtunnel then specify our --port number (in our case it is 80). After applying the above command we get a URL.

localtunnel port forwarded URL

By opening this URL we can access our localhost from anywhere in the internet. Before that we got a warning page (first time only) to prevent spamming or misusing the service.

localtunnel warning
In the above screenshot we can see the warning page for first time when we open the localtunnel link. When we click on "Click to Continue" we reach to our localhost page, as we can see it in the following screenshot:
localhost page on internet
We can open this page from any device or network until the localtunnel connection open. We also have open this link on our phone and reach to that web page, shown in the following screenshot:

localtunnel on phone

Localtunnel will be not very much useful for phishing etc for the warning page. But this is a very easy method for port forwarding without router. This might be very handy to show a project to client remotely. We can easily forward port by using this on our Kali Linux or any other Debian based Linux distribution.

Warning:- This tutorial is written for pure educational purpose only. If anyone do any illegal activity then we are not responsible for that.

Love our articles? Make sure to follow us on Twitter and GitHub, we post article updates there. To join our KaliLinuxIn family, join our Telegram Group. We are trying to build a community for Linux and Cybersecurity. For anything we always happy to help everyone on the comment section. As we know our comment section is always open to everyone. We read each and every comment and we always reply.
Kali Linux


Post a Comment
  • R.O.O.T photo
    R.O.O.TMay 25, 2021 at 6:39 PM

    Okay, but the question if we want to share a payload file through port forwarding like we do in android hacking, so how do we do it ??

    Delete Comment
    • Kali Linux photo
      Kali LinuxMay 26, 2021 at 6:33 PM

      You need to host a localhost server with the payload then forward the loacalhost server to the internet.

      Delete Comment
      • R.O.O.T photo
        R.O.O.TJune 4, 2021 at 3:37 PM

        Okay, Thanks for a quick reply

        Delete Comment
        • AnonymousDecember 15, 2022 at 1:41 AM

          I want to make payload with port forwarding using your method how can I do it

          Delete Comment
        • AnonymousApril 26, 2023 at 6:32 PM

          wont the warning page just make everyone doubt the site?

          Delete Comment
          • AnonymousApril 26, 2023 at 11:51 PM

            This is a concept. The warning is for security and prohibit the misuse of the service.

            Delete Comment
          • AnonymousApril 26, 2023 at 6:33 PM

            Can i use this with koadic?

            Delete Comment
            • AnonymousJune 13, 2023 at 5:03 AM

              Ok, so I'm completely lost after the installation of local tunnel

              Delete Comment