# Consul will not resolve DNS names on ubuntu 18.04

**URL:** <https://discuss.hashicorp.com/t/consul-will-not-resolve-dns-names-on-ubuntu-18-04/2129>\
**Category:** Consul\
**Tags:** dns\
**Created:** [July 25, 2019, 5:19pm UTC](https://discuss.hashicorp.com/t/consul-will-not-resolve-dns-names-on-ubuntu-18-04/2129 "2019-07-25T17:19:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![queglay](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/queglay/32/1858_2.png) [@queglay](https://discuss.hashicorp.com/u/queglay)\
**Post date:** [January 14, 2021, 11:39am UTC](https://discuss.hashicorp.com/t/consul-will-not-resolve-dns-names-on-ubuntu-18-04/2129/5 "2021-01-14T11:39:39Z")

</div>

I’m pretty new to all this, but shared similar issues, that I partly resolved.

The only reason why I use ubuntu 18 is because of the AWS vault deployment example, and I also use open vpn ami’s which are ubuntu 18. I’m open to alternatives though…

I tried to use [https://github.com/hashicorp/terraform-aws-consul.git](https://github.com/hashicorp/terraform-aws-consul.git)

In ubuntu 18, I found that /etc/resolv.conf was not linked to /run/systemd/resolve/resolv.conf, and although I could be wrong, this seems incorrect

I assume this is why it attempts to use 127.0.0.53 to resolve dns, which is definitely a part of the problem

So if I do this,

```auto
"sudo unlink /etc/resolv.conf",
"sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf"

```

Then this now works where previously it didn’t:

```auto
dig vault.service.consul

```

but… as soon as I do that,  
i’ll see another error when I use sudo:

```auto
sudo: unable to resolve host ip-172-31-19-129: Resource temporarily unavailable

```

And that is because the hostname (ip-172-31-19-129) doesn’t exist in /etc/hosts.  
So if ubuntu doesn’t set the hostname in /etc/hosts, how does it resolve it normally? Considering this information, I wonder if im on the right path and there is just some other missing piece…

I would love to find a golden answer to this problem. It seems google produces so many different solutions to the topic…

---

_[View the full topic](https://discuss.hashicorp.com/t/consul-will-not-resolve-dns-names-on-ubuntu-18-04/2129)._
