# DNS filter is not working

**URL:** <https://discuss.elastic.co/t/dns-filter-is-not-working/254781>\
**Category:** Logstash\
**Created:** [November 9, 2020, 3:34pm UTC](https://discuss.elastic.co/t/dns-filter-is-not-working/254781 "2020-11-09T15:34:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhansibalu](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@jhansibalu](https://discuss.elastic.co/u/jhansibalu)\
**Post date:** [November 9, 2020, 3:34pm UTC](https://discuss.elastic.co/t/dns-filter-is-not-working/254781/1 "2020-11-09T15:34:50Z")

</div>

```
Hi here I am trying to resolve the hostname to host ipaddress

Here is my dns configuration in filter block

```

> mutate {  
> rename =\> {"host" =\> "[host][hostname]"}  
> add\_field =\> {"[host][ipaddress]" =\> "%{[host][hostname]}" }  
> }  
> dns {  
> resolve =\> ["[host][ipaddress]" ]  
> action =\> "replace"  
> }
> 
> ```
> }
> 
> ```

I want is to replace all Host names with a IP with the DNS Filter.  
I am not getting any error but it doesn't resolve all hosts.  
How to fix this issue.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 10, 2020, 2:20am UTC](https://discuss.elastic.co/t/dns-filter-is-not-working/254781/2 "2020-11-10T02:20:53Z")

</div>

What sorts of hosts is it not resolving?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 8, 2020, 2:20am UTC](https://discuss.elastic.co/t/dns-filter-is-not-working/254781/3 "2020-12-08T02:20:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
