# Cannot access DNS server from k0s pods that lives in WSL

**URL:** https://forums.k8slens.dev/t/cannot-access-dns-server-from-k0s-pods-that-lives-in-wsl/947
**Category:** All about k0s
**Tags:** kubernetes
**Created:** [August 15, 2023, 1:00am UTC](https://forums.k8slens.dev/t/cannot-access-dns-server-from-k0s-pods-that-lives-in-wsl/947 "2023-08-15T01:00:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![davidshen84](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/davidshen84/32/558_2.png) [@davidshen84](https://forums.k8slens.dev/u/davidshen84)
#### Post date: [August 15, 2023, 1:00am UTC](https://forums.k8slens.dev/t/cannot-access-dns-server-from-k0s-pods-that-lives-in-wsl/947/1 "2023-08-15T01:00:27Z")

</div>

Hi,

I have two k0s installations, and both are in a WSL environment. The one on my personal computer works fine, and can access public DNS servers. However, the one on my company computer cannot access any DNS server, not even a dnsmasq service on the same machine.

While testing the k0s on my company computer, I updated `coredns` to forward queries to my local dnsmasq server. I can see the queries from the `coredns` pod when it initializes, but the `coredns` log shows it cannot get responses from the DNS server.

My company computer may have some firewall rules blocking the DNS queries. If I could identify the rule, I could work with our IT security to resolve this. It does not make sense to block DNS queries from the k0s cluster.

Thanks.

---

<div class="post-metadata">

### Author: ![davidshen84](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/davidshen84/32/558_2.png) [@davidshen84](https://forums.k8slens.dev/u/davidshen84)
#### Post date: [August 16, 2023, 1:03am UTC](https://forums.k8slens.dev/t/cannot-access-dns-server-from-k0s-pods-that-lives-in-wsl/947/2 "2023-08-16T01:03:23Z")

</div>

Sorry, I am not entirely sure it has anything to do with company IT security.

Here are the observations:

1. My WSL cannot access any public DNS, like `1.1.1.1`.
2. My WSL can access a dnsmasq server on my Windows host.
3. Pods in my k0s cannot access any DNS, not even the dnsmasq on my Windows host.

Most strangely, in a pod with DNS utilities, if I try to query against my dnsmasq server, I can see the query logs in my dnsmasq server, but the dns utility in the pod still responds timeout.

---

<div class="post-metadata">

### Author: ![jnummelin](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/j/c5a1d2/32.png) [@jnummelin](https://forums.k8slens.dev/u/jnummelin)
#### Post date: [August 16, 2023, 9:29am UTC](https://forums.k8slens.dev/t/cannot-access-dns-server-from-k0s-pods-that-lives-in-wsl/947/3 "2023-08-16T09:29:11Z")

</div>

> [@davidshen84](#):
>
> I can see the query logs in my dnsmasq server, but the dns utility in the pod still responds timeout.

That sounds like the networking between the WSL and Windows is somehow broken, i.e. the responses are not properly routed back or something.

---

<div class="post-metadata">

### Author: ![olivier.spiesser](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/o/34f0e0/32.png) [@olivier.spiesser](https://forums.k8slens.dev/u/olivier.spiesser)
#### Post date: [November 27, 2024, 3:33pm UTC](https://forums.k8slens.dev/t/cannot-access-dns-server-from-k0s-pods-that-lives-in-wsl/947/4 "2024-11-27T15:33:29Z")

</div>

Hello,  
were you able to resolve it and find root cause?
