Hi,
Everytime I want to start mij viktor app, I need to change the ‘nameserver’ for it to work.
I do this by:
sudo nano /etc/resolv.conf
Then typing the following in the file:
nameserver ‘8.8.8.8’
Then I save (CTRL+S) and exit.
Howevery, the next time (after shutting down my laptop) the resolv.conf
is empty again. How can I fix this?
Hi Marlies,
This is a known issue in WSL2 where DNS resolution is not working. Microsoft is tracking the problem in this issue.
Your solution is indeed the way to go by configuring WSL2 to use Google’s public DNS server located at IP address 8.8.8.8. However, I believe an additional step is needed where you disable the automatic generation of a new resolv.conf
. You can do this by:
- Creating a WSL configuration file:
touch /etc/wsl.conf
- Disable generating
resolv.conf
by adding to the wsl.conf:
[network]
generateResolvConf = false
Hope this helps!