# Help setting up a DNS

**URL:** <https://community.ipfire.org/t/help-setting-up-a-dns/6672>\
**Category:** DNS\
**Created:** [20 November 2021 19:21 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672 "2021-11-20T19:21:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![egutierrez](https://community.ipfire.org/user_avatar/community.ipfire.org/egutierrez/32/4470_2.png) [@egutierrez](https://community.ipfire.org/u/egutierrez)\
**Post date:** [20 November 2021 19:21 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/1 "2021-11-20T19:21:38Z")

</div>

Hi i have this setup, and id like to have some clues or config examples of DNS:

 ![imagen](https://community.ipfire.org/uploads/default/original/2X/2/21691d5b5ae35aad032723976f3540b8e4ef34d4.png)

Id like to install bind9 in an ubuntu 18.04 in address 192.168.2.2 ( dmz, orange zone),  
This dns would have entries from green zone.

pc1,[class5.com](http://class5.com) 192.168.0.5 ( green)  
pc2,class5,com 192.168.0.6 ( green)  
professor.class5,cin 192.168.50 ( reserved ip in dhcp server)  
servidor.dns 192.168.2.2 ( dns server in dmz, orange)

Also would like to know how to add a dynamic ip from blue zone  
ex:  
192.168.4.5 ( ip in blue, wan obtained dynamically)

I suppose i need only one dns to all this no ?

Thanks

---

<div class="post-metadata">

**Author:** ![m\_maassen](https://community.ipfire.org/user_avatar/community.ipfire.org/m_maassen/32/4701_2.png) [@m\_maassen](https://community.ipfire.org/u/m_maassen)\
**Post date:** [21 November 2021 15:36 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/2 "2021-11-21T15:36:42Z")

</div>

Hi Eduardo,

first remark: the interfaces of your ipfire are named “virtualbox…”. I hope, you have read the wiki article regarding installing ipfire in Virtual Environments, especially its disadvantages:  
[Virtual Environments](https://wiki.ipfire.org/hardware/virtual)

second remark: why do you want to set up a seperate DHCP/DNS , when ipfire can do all for you?  
Here you can set up the DHCP for BLUE and GREEN zone:  
[DHCP Server](https://wiki.ipfire.org/configuration/network/dhcp)  
Its also possible to distribute quasi-static IP-addresses, that is the DHCP-Server delivers always the same IP to the same MAC-adress, while the client uses dynamic DHCP.

The servers in DMZ you configure here  
[Edit hosts](https://wiki.ipfire.org/configuration/network/hosts)

This way, ipfire is DHCP and DNS server for all your network, and can also resolve all dynamic clients in BLUE/GREEN zone.

hth.  
Michael

---

<div class="post-metadata">

**Author:** ![egutierrez](https://community.ipfire.org/user_avatar/community.ipfire.org/egutierrez/32/4470_2.png) [@egutierrez](https://community.ipfire.org/u/egutierrez)\
**Post date:** [23 November 2021 13:28 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/3 "2021-11-23T13:28:03Z")

</div>

Sorry my late answer but ive been busy these days:  
1 - Virtual environments → Told in other posts, im a teacher in vocational education in ccomputer science, so virutalization is the way to reproduce real world problems-schemas. No budget to create a real network with hardware routers and switches…

2 - DNS → Related to the 1. As educational i want to teach how to setup a dns in the lan of their company, with web server, dns server and mail server located in orange dmz zone. Id like to use bind9.

So id like to have an idea or how to setup a dns in organge zone.

Thanks

---

<div class="post-metadata">

**Author:** ![anon42188109](https://community.ipfire.org/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@anon42188109](https://community.ipfire.org/u/anon42188109)\
**Post date:** [23 November 2021 14:36 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/4 "2021-11-23T14:36:43Z")

</div>

Make another VM, ubuntu server 20.04, make it connect to the orange interface in Virtualbox and install unbound on that VM. [How To Install Unbound Local DNS Resolver on Ubuntu 20.04 - Linux Tutorial - Atetux](https://atetux.com/how-to-install-unbound-local-dns-resolver-on-ubuntu-20-04) This unbound is unrelated to the unbound ipfire uses. Let your students configure/test it.

---

<div class="post-metadata">

**Author:** ![m\_maassen](https://community.ipfire.org/user_avatar/community.ipfire.org/m_maassen/32/4701_2.png) [@m\_maassen](https://community.ipfire.org/u/m_maassen)\
**Post date:** [23 November 2021 16:09 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/5 "2021-11-23T16:09:19Z")

</div>

OK, to get something work is another thing than teaching/learning.

Set up the DNS on your server in the DMZ (bind9/unbound - whatever you want).  
But clients, getting their IP from IPfire can normally only resolved from IPfire.  
IMHO it is not possible that the server in ORANGE works as DHCP-Server for GREEN/BLUE.

Here is my suggestion:

- Configure DHCP on IPfire in such a way, that it delivers the IP from your DNS in ORANGE as Nameserver to the clients.
- Configure the DNS in such a way, that IPfire is used as forwarder (because only IPfire knows, which client has which IP-address).

Otherwise you have to register every client in the DNS-Server in ORANGE manually, and you have to ensure, that DHCP on IPfire delivers always the same Ip to the same MAC-Address. Thats a lot of work, but may be a good exercise for your students.

---

<div class="post-metadata">

**Author:** ![egutierrez](https://community.ipfire.org/user_avatar/community.ipfire.org/egutierrez/32/4470_2.png) [@egutierrez](https://community.ipfire.org/u/egutierrez)\
**Post date:** [23 November 2021 16:41 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/6 "2021-11-23T16:41:03Z")

</div>

Thanks for you help.  
@anon42188109 why unbound ? and not bind9 ? Seems bind9 is the standard in ubuntu system.  
I have till now a vm with ubunu in orange zone with lets say 192.168.2.2 and gateway 192.168.2.1.  
I have installed bind9…and now i need some advice in config setup …the zones and registers in DNS, suppose in all the green, and orange zone i need to setup primary dns 192.168.2.1 and secondary 8.8.8.8 for example.

Thanks again

---

<div class="post-metadata">

**Author:** ![anon42188109](https://community.ipfire.org/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@anon42188109](https://community.ipfire.org/u/anon42188109)\
**Post date:** [23 November 2021 17:29 UTC](https://community.ipfire.org/t/help-setting-up-a-dns/6672/7 "2021-11-23T17:29:30Z")

</div>

configuration of bind9 is a bit more involved than configuration of unbound.
