I have set up a Kali Linux virtual machine in my Windows 10 using vmware workstation

Internet is working fine with this automatic configuration (NAT) (Edit : I tried Bridged too but still the same problem)

enter image description here

I want to set up a static ip address using these lines :

auto eth0 
iface eth0 inet static
   dns-domain test.com

Doing that I lose my internet and I can't ping my gateway inside the virtual machine using


it shows me the error Host unreacheable

I only can ping

How can I have access to internet again and how can I ping my gateway inside the virtual machine ?

Thank you


Assuming that is a valid but unused IP address for the network segment the Windows 10 host is physically connected to, you'll need to change the Network connection setting in the right side of that VMware dialog from NAT to Bridged.

While the Network connection is set to NAT, there is not much point in setting a static IP address, as the IP address of the VM is only ever seen by the NAT subsystem of VMware and nothing else.

  • Thank you @telcoM for your answer I have tried that too but still have the same problem I can ping but I can't ping inside the virtual machine
    – balimaco00
    Feb 3 '20 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.