Forum Thread: How to Enable Port-Forwarding

How to Enable Port-Forwarding

Hey everyone,

I wanted to know how to enable port-forwarding in Kali linux (I want to use my public IP address for reverse-tcp connection in metasploit exploits).

10 Responses

you mean he should set it to 192.168.X.X ?

and, another question:
when i set my LPORT to 8080,i should forward port 8080 in my router?

Ports are forwarded to internal IP. Payloads should use public IP.

The incoming connection from the payload needs to know the public IP to connect back to the listener (because the exploit and the listener might be on two different computers) and the port, that NAT then resolves into an internal IP. Router remembers which computer in the LAN is listening the incoming connection and initializes it. I'm pretty sure it is like this, after my recent studies about networking, so if you have evidence that I'm wrong, please correct me.

OK,so i have opened port 8080 and 4444 on my router (here's the screen-shot)

Image via

but i still can't bind a reverse-tcp connection. what is the problem? should i configure Linux?

1.yeah, I checked that in ifconfig
2.interesting,im working on it...

here's a Screen-Shot of the metasploit settings:

Image via

Well, it waits for 180 secs but nothing happens
(Im shure that the Remote computer IS vulnerable.)


by the way, there is another option in my router settings named "Port-Triggering". Won't that help?

Is there any difference in port forwarding when using kali as vm and kali as only or host OS?

Share Your Thoughts

  • Hot
  • Active