Comment 9 for bug 1916817

Revision history for this message
Cris Bennett (crispinb) wrote :

1. contents of cat /etc/hosts;

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf: # [network] # generateHosts = false 127.0.0.1 localhost 127.0.1.1 bamboo.localdomain bamboo # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

2. My daily in-use WSL distro is Ubuntu-20.04. As I mentioned a few comments above, this experiences the same issue. My workaround has been to suppress resolv.conf autogeneration, and supply my own DNS resolver details.

  (1) content of /etc/wsl.conf;

[network]
generateResolvConf = false

  (2) content of /etc/resolv.conf;

# 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
nameserver 1.1.1.1

  (3) contents of cat /etc/hosts.

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

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters