• Home
  • Hacking & Security
    • Network Hacking
    • Web Hacking
    • Social Engineering
    • Kali Linux
    Submit An Article
  • Courses
    • All Courses
    • Bundles
    • Masterclass
    • VIP Membership
    • FAQ

    Popular Courses

  • Shop
    • Hardware Bundles
    • Wireless Adapters
    • Pentesting Tools
    • Security
    • Accessories
    • Clothing
    • Books
    • All
  • Competition
  • Services
    Penetration Testing
    Consulting
    Code Review
    One on one Training
    Online Courses
    VPN
  • Blog
      • Cart

    VIP Membership Masterclass
    Got a question?
    [email protected]
    RegisterLogin
    zSecurity
    • Home
    • Hacking & Security
      • Network Hacking
      • Web Hacking
      • Social Engineering
      • Kali Linux
      Submit An Article
    • Courses
      • All Courses
      • Bundles
      • Masterclass
      • VIP Membership
      • FAQ

      Popular Courses

    • Shop
      • Hardware Bundles
      • Wireless Adapters
      • Pentesting Tools
      • Security
      • Accessories
      • Clothing
      • Books
      • All
    • Competition
    • Services
      Penetration Testing
      Consulting
      Code Review
      One on one Training
      Online Courses
      VPN
    • Blog
        • Cart

      Hacking & Security

      Port Forwarding With Localtunnel (without router access)

      • Posted by Salman Khondekar
      • Date December 13, 2019

      Previously LordVordex published a post on using Servio to forward ports without router access,

      Serveo.net is great for port forwarding but due to some issues the service sometimes gets temporarily disabled.

      Luckily serveo.net isn’t the only port forwarding / tunnelling service available. Alternatively we can use ngrok or localtunnel for achieving the same effect.

      In the following steps I will be explaining how to use localtunnel as that is my preferred one.

      About Localtunnel:

      Localtunnel allows you to easily share a web service on your local development machine without messing with DNS and firewall settings. It will assign you a unique publicly accessible url that will proxy all requests to your locally running webserver.

      Now to make localtunnel accessible globally through any network you will first need to install nodejs on your machine, rest assured everything in here is a very simple process.

      Firstly go to nodejs.org from your Kali Linux machine.

      Here you will find the latest version that’s available for your operating system. Now to install nodejs on your Kali machine via packet manager open terminal and first run the following commands:

      apt-get update
      apt-get install curl software-properties-common
      
      

      The above commands will first update your software sources, and install needed software for nodejs, when its done run the following command to download the nodejs installer:

      curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
      
      
      

      Note : you can change the ‘ 13 ‘ in the command to whichever version of nodejs you want installed. Currently the latest version is 13 so that’s what I’m using.

      That’s it now you have nodejs and npm installed.

      If you want to again which version of nodejs and npm you have installed you can always do so by running:

      node –v
      
      npm –v
      

      Now to Install Localtunnel globally to make it accessible anywhere run :

      npm install -g localtunnel

       

      Its all done now whenever you want to Start a webserver on some local port (eg http://localhost:80) use the command line interface to request a tunnel to your local server:

      lt --port 80
      
      

      This will give you a url which you can open on any device in the world and it will tunnel the port to your machine. Just make sure you have your apache service running from your kali machine before accessing the link through another device.

      Put a /Evil Files  (or whatever name with which you have saved your evil files in and it’ll open on the other device outside your network)

      Also create your payload with the desired port and use localtunnel to tunnel that port to so that you can get a reverse connection from the target device.

      Hope this helps, Happy tunnelling 🙂

      Tag:cyber security, forwarding, hacking, local tunnel, localtunnel, noip, port, port forwarding, security, serveio

      • Share:
      author avatar
      Salman Khondekar

      Mechanical Engineer who is very passionate about learning everything about programming and hacking.

      Previous post

      How To Start a Fake Access Point (Fake WIFI)
      December 13, 2019

      Next post

      Octopus: The pre-operation C2 for Red Teamers
      December 20, 2019

      You may also like

      xss_370x208
      Exploiting Reflected XSS to steal login credentials
      6 February, 2023
      wordpress-pentesting_370x208
      WordPress pentesting
      30 January, 2023
      mimikatz_370x208
      Dump LSASS without Mimikatz via MiniDumpWriteDump!
      19 January, 2023

        12 Comments

      1. kareem zaky
        December 17, 2019
        Log in to Reply

        i use node -v it give me …. v10.17.0
        i use npm -v it give me ….. 5.8.0

        i use lt –port 80 … nothing happened
        can you help me please

        • uncreativeus3rname
          December 17, 2019
          Log in to Reply

          Same here
          node -v gives v13.3.0
          npm -v gives v6.13.1

          lt –port 80 and I get nothing. not sure what i’m doing wrong. I’ve tried different ports and nothing still.

          • Salman Khondekar
            December 17, 2019
            Log in to Reply

            There are many services similar to localtunnel that you can use once node-is is installed. Run this command and it should work.

            ssh -R 80:localhost:8080 ssh.localhost.run

        • Salman Khondekar
          December 17, 2019
          Log in to Reply

          It may be possible that localtunnel might be down for some time so run this command and it should work:

          ssh -R 80:localhost:80 ssh.localhost.run

          This service is similar to localtunnel. Let me know if you need anything else

          • Salman Khondekar
            December 17, 2019
            Log in to Reply

            Or you can try

            ssh -R 80:localhost:8080 ssh.localhost.run

            Whichever works as per your needs.

            • Olamilekan Adebowale
              December 26, 2019
              Log in to Reply

              Something went wrong opening the port forward, check your SSH command output for clues!

            • vishalrao
              December 31, 2019
              Log in to Reply

              how to stop it?

              • vishalrao
                December 31, 2019

                I got this while browsing from public internet.

                Something went wrong opening the port forward, check your SSH command output for clues!

            • rishi321
              August 8, 2020
              Log in to Reply

              [email protected]: Permission denied (publickey)

              It’s getting like this ,what to do??

      2. JArthur
        December 29, 2019
        Log in to Reply

        it still shows there’s nothing here when its run

      3. j0ny
        July 30, 2020
        Log in to Reply

        How to configure it to work with BeEF which uses port 3000?

      4. gtgkartik
        January 4, 2021
        Log in to Reply

        let us suppose take my private ip address as 192.168.0.10, so what will be my Lhost and Lport in my payload and in the meterpreter session …. please help

      Leave A Reply Cancel reply

      You must be logged in to post a comment.

      Categories

      • Cryptography
      • Cryptography
      • CTF
      • Forensics
      • Hacking & Security
      • Hardware
      • IOT
      • Kali Linux
      • Network Hacking
      • News
      • OSINT
      • Post Exploitation
      • Post Exploitation
      • Privacy
      • Programming
      • Security
      • Social Engineering
      • Uncategorized
      • Web Hacking

      Popular Posts

      Got a Blank Screen After Importing Kali in Virtual Box ? Here’s How To Fix It
      25Jan2018

      Connect with us

      • Facebook
      • Twitter
      • LinkedIn
      • Instagram
      • Youtube

      “Everything related to ethical hacking

      & cyber security in one place.”

      Quick Links

      • Home
      • About Us
      • Hacking & Security
      • Download Custom Kali
      • Contact
      • FAQ

      Services

      • Penetration Testing
      • Consulting
      • Code Review
      • One on one training
      • VPN
      • VIP Membership

      Company

      • About Us
      • Contact
      • Vulnerability Disclosure

      Support

      • FAQ
      • Forums

      Copyright © 2022 Z IT SECURITY LTD t/a zSecurity. All rights reserved.

      • Privacy
      • Shipping
      • Refunds
      • Terms

      Contribute

      Share your knowledge with the world

      SUBMIT AN ARTICLE

      Login with your site account

      Lost your password?

      Not a member yet? Register now

      Register a new account


      Are you a member? Login now

      Enroll in this course to access this lesson!

      All of our courses include:

      ✔ Lifetime, unlimited access to course materials & training videos.

      ✔ Watch online or download lectures for offline use.

      ✔ Verifiable certificate of completion from zSecurity, signed by the course instructor, Zaid.

      ✔ Get answers from our Support Team within a maximum of 15 hours.

      ✔ Unlimited Updates.

      Get free 1 month VIP membership per course with:

      ✔ Live mentorship and Q&A session with the course instructor, Zaid.

      ✔ Instant support from community members through our private discord channel.

      ✔ Daily updates with the latest tutorials & news in the hacking world.

      ✔ Daily resources like CTFs, bug bounty programs, onion services and more!

      ✔ Access our VIP community & connect with like-minded people.

      ✔ Discounts on other zSecurity products and services.

      We are using cookies to give you the best experience on our website. This includes but is not limited to:

      • Storing your settings and preferences.
      • Remember your access information
      • Track website performance and make our website more relevant to you.

      You can find out more about which cookies we are using or switch them off in settings.

      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      3rd Party Cookies

      This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.

      Keeping this cookies enabled helps us to improve our website.

      Please enable Strictly Necessary Cookies first so that we can save your preferences!

      Powered by  GDPR Cookie Compliance