```
$ sudo apt update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

```

* System: Windows 10 PRO 19044.1415
* WSL 2, Ubuntu 20.04

`ping` to google.com also fails: `ping: google.com: Temporary failure in name resolution`

---

**Already done:**

* `wsl.conf` with those lines inside of it:

```
[network]
generateResolvConf = false

```

* re-created `resolv.conf` with several `nameserver`'s:

```
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1

```

---

**Tried:**

* to add `nameserver 8.8.8.8` into `wsl.conf`. Doesn't work.
* keep single `nameserver` line inside of `resolv.conf`
* followed [those steps](https://github.com/microsoft/WSL/issues/5256#issuecomment-666545999)
* `New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow` from [here](https://github.com/microsoft/WSL/issues/4585#issuecomment-610061194)

---

Question replaced from StackOverflow