Tuesday, February 14, 2023

Fix WSL unable connect to internet.

  

The goal of this short article is to fix Linux system internet issue which run under WSL (Windows Subsystem for Linux), the ussual symptomp is :

1. Linux system are able reach external IP network by ICMP.

2. Linux system are unable to resolve domain, for example we can check using nslookup or ping to destination domain.

To fix this issue there are simply two step to do :

1. Create wsl.conf file under /etc to ensure system doesn't regenerate /etc/resolv.conf, to do this  : vi /etc/wsl.conf

[network]
generateResolvConf = false

2. Recreate /etc/resolv.conf : echo 'nameserver 1.1.1.1' > /etc/resolv.conf

Then simply test the connectivity using nslookup or ping to destination domain.

Thank you for reading,

Barakallahu fiikum.

No comments:

40 Hadist Seputar Keluarga Samawa (Bagian 3)

 ﷽ Ustadz Yusuf Abu Ubaidah As-Sidawi hafizahullohuta'ala Masjid Al-Aziz  Jl. Soekarno Hatta No. 662 Bandung Hadist 11 : Doa Orangtua Bu...