Useful or not, from you.
WSL /etc/resolv.conf always automatically made, and ignores /etc/wsl.conf

In /etc/resolv.conf it says:

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:     
# [network]
# generateResolvConf = false

Environment

Microsoft Windows [Version 10.0.19041.329]
Ubuntu lsb_release -r
WSL 2

Steps to reproduce

  1. /etc/wsl.conf didnt exist for me, so create it and add the following text to it:
[network] 
generateResolvConf = false 
  1. Save and close.
  2. Close Terminal, and re-open it.
  3. Open /etc/wsl.conf and edit the auto generated nameserver which fails to resolve, change it to something like 8.8.8.8.
  4. Save and close
  5. Wait a short while, and soon /etc/wsl.conf has reverted soon back to something like 172.30.16.1 which cant resolve github.com or PPA's etc.

Expected behavior

Not to change the nameserver as per the instructions.

Actual behavior

Windows is changing the nameserver to something that doesnt work. The fix to the fix is not working.

That's a useful answer
Without any help

Ref #4285 (the de-facto hangout).