I have a VM machine (Kali Linux) using NAT Network. I am trying to configure the router to forward connections to Kali on port 80. The local IP of Kali is and my local IP is Virtual Server

When I try to save this, I get:

Error code: 4937

The IP address is not in the same subnet with LAN IP address. Please input another one.

What am I doing wrong?

  • What are you trying to access the VM from? The Internet or your computer running the VM?
    – user
    Aug 14, 2019 at 17:23
  • @user, I am not sure I understand your question. I want to start a listener on my VM and use the backdoors that I create outside my network.
    – Kite
    Aug 14, 2019 at 17:26
  • Then you will need to port forward from the router to your device, and port forward from your device to your VM ( That IP looks like a VirtualBox NAT IP address, so you can set up a port forward in VirtualBox to get port 80 exposed on the host.
    – user
    Aug 14, 2019 at 17:28
  • You should ask this on stackoverflow or super user instead.
    – Vipul Nair
    Aug 14, 2019 at 17:42
  • @user, I am not sure how to do this. My device is my host OS.
    – Kite
    Aug 14, 2019 at 17:45

2 Answers 2


This is your current network:

╔══════════════╗   ╔════════════════════╗   
║VM @║───║Host @║───[Internet]
╚══════════════╝   ╚════════════════════╝

This is what you're trying to do (forward port 80 on your router to

╔══════════════╗   ╔════════════════════╗   
║VM @║───║Host @║───[Internet]
╚══════════════╝   ╚════════════════════╝       │
       └─────────────────────────(Port 80)──────┘

This isn't going to work because the router doesn't know that is behind

Instead you need to do this (forward port 80 on your router to, which knows about

╔══════════════╗   ╔════════════════════╗   
║VM @║───║Host @║───[Internet]
╚══════════════╝   ╚════════════════════╝       │
                               └───(Port 80)────┘

And then do this (now that is getting traffic, send it to

╔══════════════╗   ╔════════════════════╗   
║VM @║───║Host @║───[Internet]
╚══════════════╝   ╚════════════════════╝       │
       └───(Port 80)────┘      └───(Port 80)────┘

As user stated you need to forward traffic from your router to the VM host ( from there I would recommend one of two options:

1: Configure the VM to use network bridging which will use DHCP to get an IP address from your router and will be accessible like any other device on your local network. (You would then forward traffic to the DHCP assigned address in the for the VM)

2: Configure port forwarding to your VM on your hypervisor.

Example configuration: https://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/

Depending on what you're using for virtualization it will be a little different but the same concepts apply across all hypervisors.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .