# Adding DNS entries

**URL:** <https://forum.openwrt.org/t/adding-dns-entries/3258>\
**Category:** Installing and Using OpenWrt\
**Created:** [April 24, 2017, 6:13pm UTC](https://forum.openwrt.org/t/adding-dns-entries/3258 "2017-04-24T18:13:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![max](https://forum.openwrt.org/letter_avatar/max/32/5_5575768a8748004e209b776fc1b2916d.png) [@max](https://forum.openwrt.org/u/max)\
**Post date:** [April 24, 2017, 6:13pm UTC](https://forum.openwrt.org/t/adding-dns-entries/3258/1 "2017-04-24T18:13:34Z")

</div>

Hi LEDE community,

where can I define/add DNS entries for my local VM's?

Thanks

---

<div class="post-metadata">

**Author:** ![Wally](https://forum.openwrt.org/letter_avatar/wally/32/5_5575768a8748004e209b776fc1b2916d.png) [@Wally](https://forum.openwrt.org/u/Wally)\
**Post date:** [April 24, 2017, 7:03pm UTC](https://forum.openwrt.org/t/adding-dns-entries/3258/2 "2017-04-24T19:03:07Z")

</div>

Edit file:

```
/etc/config/dhcp

```

and add section:

```
config domain
      option name 'host_name'
      option ip 'host_ip'

```

for each host and restart dnsmasq.  
Or in LuCi: Network -\> Hostnames

---

<div class="post-metadata">

**Author:** ![r43k3n](https://forum.openwrt.org/letter_avatar/r43k3n/32/5_5575768a8748004e209b776fc1b2916d.png) [@r43k3n](https://forum.openwrt.org/u/r43k3n)\
**Post date:** [April 24, 2017, 7:03pm UTC](https://forum.openwrt.org/t/adding-dns-entries/3258/3 "2017-04-24T19:03:30Z")

</div>

You should probably try adding them to /etc/hosts  
Router reboot might be required after the changes.

---

<div class="post-metadata">

**Author:** ![max](https://forum.openwrt.org/letter_avatar/max/32/5_5575768a8748004e209b776fc1b2916d.png) [@max](https://forum.openwrt.org/u/max)\
**Post date:** [April 24, 2017, 7:10pm UTC](https://forum.openwrt.org/t/adding-dns-entries/3258/4 "2017-04-24T19:10:29Z")

</div>

@Wally @r43k3n Thanks a lot. works like a charm.
