The most obvious solution was to check if internet access was available in the bridged mode and it's working fine. But using the default switch in Hyper-V i'm unable to access the internet. I need my hyper-V VM(Kali) to be in NAT mode itself. After some intense googling i found that internet access is not available in the default switch of hyper-V. But i did find a post in a forum where they seemed to be having internet access in the default switch itself. The most common solution i found in the internet was to change the metric value in the network adapter of the guest VM. But this can only be used if the guest VM is windows.
I tried setting the IP and DNS as automatically assigned in my host windows default switch network adapter. Tried setting the gateway as my host VM ipaddress to see if the issue was due to DNS resolution. Is there anyway to enable internet in the default switch mode?
11 Answer
I have done a test in my lab and you could achieve you goal by attached screenshot of detailed steps.
For more details, please refer to this article from Microsoft Set up a NAT network
1