To establish connectivity between WSL2 and the host using actual IP, follow the steps below:
Check the IP Address of the Host: Open the command prompt on the host machine and type "ipconfig" to check the IP address.
Configure WSL2 network settings: In the WSL2 terminal, type "sudo nano /etc/wsl.conf" to edit the configuration file. Add the following lines:
[network] generateResolvConf = false
address = <host's ip="" address="">
Restart WSL2: In the WSL2 terminal, type "wsl --shutdown" to shut down WSL2 completely. Then, restart WSL2 by opening the terminal again.
Test connectivity: In the WSL2 terminal, try pinging the host's IP address to ensure connectivity.
By following these steps, you should be able to establish connectivity between WSL2 and the host using actual IP.
Asked: 2021-04-18 11:00:00 +0000
Seen: 11 times
Last updated: Aug 31 '22