I have a fresh installation of Windows 11 with ubuntu 20.04 installed inside wsl2.
When I try to perform an update sudo apt update or even ping google.com I get
Temporary failure resolving 'archive.ubuntu.com'
and
Temporary failure in name resolution
errors respectively.
I've tried:
Allowed wsl through the windows firefall using 'allow an app through the firewall' and selecting
C:\Windows\System32\wsl.exeAdded inbound rule in firewall for port 3390
Set network profile to 'private' (although I would prefer to keep this public if there's a way to keep wsl working)
running
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allowfrom a google search
EDIT: At this point I've tried every google result and still no solution. r/windows11 won't let me post unless it's a Monday (stupid). Also tried reinstalling ubuntu on wsl to no avail.

/etc/resolv.conf? It should have an address in the private IP address space that corresponds to the default route shown byip route. Can you ping this address? – NotTheDr01ds Dec 03 '21 at 21:01/etc/resolv.conf? – Daniel B Dec 14 '21 at 16:44