# Add bind9 server to IPFire system?

**URL:** <https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559>\
**Category:** Add-Ons\
**Created:** [6 November 2023 14:03 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559 "2023-11-06T14:03:02Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![nurbles62](https://community.ipfire.org/user_avatar/community.ipfire.org/nurbles62/32/9226_2.png) [@nurbles62](https://community.ipfire.org/u/nurbles62)\
**Post date:** [6 November 2023 14:03 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/1 "2023-11-06T14:03:02Z")

</div>

I haven’t found a PAKFire package for bind9, so I’m guessing this isn’t supported but…

My old gateway/firewall machine died after a (far too close!) lightning strike. I thought I’d use an IPFire distro to get a new one up and running fast – and it worked great!

Except for one thing: My old, hand-built firewall system was also a backup nameserver for my company’s domain. I’d really like to add that one functionality to the IPFire system rather than start from scratch, building a new firewall for myself starting with a Ubuntu server (like last time). I expect that EVERYTHING has changed – after all, more than a month has passed – so what I knew about setting one up last time is likely obsolete and incorrect now.

So, is it possible to add a bind9 (named) server to my IPFire system? If so, can anyone offer and tips, hints, pitfalls, etc.? Thanks!

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [6 November 2023 14:21 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/2 "2023-11-06T14:21:08Z")

</div>

This is old and not sure if it is helpful.

> [@Nsupdate (DDNS for bind): How to use?](https://community.ipfire.org/t/nsupdate-ddns-for-bind-how-to-use/7629/5):
>
> I dived deeper into the python code and I found the problem. It is reported on IPFire’s Bugzilla under #[12837](https://bugzilla.ipfire.org/show_bug.cgi?id=12837). Until this is solved, I do not see how the nsupdate provider can be used. For the moment I use a bash script\* to do the job. It was easy to use a dhcpcd exit hook to start the script: it need a link in the right directory. Use locate dhcpcd | grep hook to find dhcpcd’s hook directory and place a soft link there pointing to your script. The script needs to react on the reason of a cal…

There is also some info on RFC2136 in the wiki.  
Not sure if that is related?

> **[DHCP Server - The IPFire Wiki](https://wiki.ipfire.org/configuration/network/dhcp#dns-update-in-ipfire)**

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [7 November 2023 11:52 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/3 "2023-11-07T11:52:53Z")

</div>

IPfire has bind 9.16.44  
Hope that helps.?  
Would be great to hear how you make out.

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [7 November 2023 12:25 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/4 "2023-11-07T12:25:54Z")

</div>

This not true. IPFire uses unbound!

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [7 November 2023 12:46 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/5 "2023-11-07T12:46:17Z")

</div>

> [@hvacguy](#):
>
> IPfire has bind 9.16.44

> [@bbitsch](#):
>
> This not true. IPFire uses unbound!

Both above are true.

unbound is used as the DNS server on IPFire.

bind is also installed but only used to provide the utilities

- dig
- host
- nslookup
- nsupdate

and the libraries

- libbind9
- libdns
- libirs
- libisc
- libisccc
- libisccfg
- libns

for those applications used in IPFire that require certain bind libraries to be linked in for their usage.  
bind is not used as a dns server on IPFire.

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [7 November 2023 13:09 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/6 "2023-11-07T13:09:13Z")

</div>

I don’t think, these ‘standard’ tools are part of BIND9.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [7 November 2023 13:29 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/7 "2023-11-07T13:29:58Z")

</div>

> [@bbitsch](#):
>
> I don’t these ‘standard’ tools are part of BIND9.

They are not part of the bind server but they are part of the bind source package and if you want them you have to install them from the bind source tar ball or you don’t have them.

IPFire just doesn’t install the named part of bind. It individually installs the specified tools by having a make install step for each of the tools.

The original poster wanted to have the bind named service and that is not provided in IPFire, as it uses unbound.

The only way to get the fuill bind installed would be to build a customised version of IPFire as per

[https://wiki.ipfire.org/devel/ipfire-2-x/build-howto](https://wiki.ipfire.org/devel/ipfire-2-x/build-howto)

but then you would also need to understand how to configure bind so that it could work with unbound also present so that DNS forward loops don’t occur.

Also every time IPFire had a new Core Update the customised build would need to be rerun and installed to keep up to date.

For a backup of another nameserver I would suggest installing it on another pc server that does not already have a DNS server on it.

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [7 November 2023 14:22 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/8 "2023-11-07T14:22:48Z")

</div>

Another thing is, that this breaks IPFire’s philosophy. Nearly should be configurable with the WUI. There are no faciities implemented.  
Further most ( all? ) users/devs are familiar with the unbound system, but not BIND. So there is almost no support for this piece of software and it’s usage in an IPFire system.

Because communication in the internet relies heavily on DNS, I would not recommend such a massive change.  
Using an alternative DNS server in the local network may be an opportunity.

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [7 November 2023 19:55 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/9 "2023-11-07T19:55:48Z")

</div>

Is unbound used for local name server?  
If so, how do you find the names?

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [7 November 2023 20:22 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/10 "2023-11-07T20:22:30Z")

</div>

How do find the names with BIND? 😉

IPFire uses the tool unbound-dhcp-leases-bridge.  
This transfers the informations from the DHCP fixed leases to unbound.

One way is

- allow a new client to get a dynamic lease from DHCP server.
- hopefully the client tells its host name
- define a fixed lease for this client using the name for the comment
- unbound should know now .

This is a theoretical approach. Didn’t check all steps for effectiveness.

If there is a way to extract the local name data base from BIND, it may be possible to automate the transfer to unbound.

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [7 November 2023 21:28 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/11 "2023-11-07T21:28:13Z")

</div>

Not bind specific.  
Unbound in IPfire. Uses the name in the dynamic lease section of the DHCP page?  
And for fixed leases it uses the edit host page info.?

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [7 November 2023 21:52 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/12 "2023-11-07T21:52:38Z")

</div>

No, for **fixed** leases the ‘comment’ field is used as a host name ( if syntactical correct ). You have to transfer it, if you make a dynamic lease fixed.

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [8 November 2023 16:18 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/13 "2023-11-08T16:18:08Z")

</div>

> [@nurbles62](#):
>
> firewall system was also a backup nameserver for my company’s domain

Can this be done with unbound instead?

---

<div class="post-metadata">

**Author:** ![dr\_techno](https://community.ipfire.org/user_avatar/community.ipfire.org/dr_techno/32/15388_2.png) [@dr\_techno](https://community.ipfire.org/u/dr_techno)\
**Post date:** [13 September 2024 01:16 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/14 "2024-09-13T01:16:09Z")

</div>

I really don’t understand why they used unbound in the first place.  
But there is other things I do question the usage in the unbound.conf file.  
I’ll just list them out here:

1. The “allowed access from everywhere” is the first thing I see is incorrect to the standard way of using unbound. (0.0.0.0/0 allow) as its normally just allowing recursive query on the network, local host and local loopback on the machine in the config file. So the file should be like:

I wonder how susceptible it is to a DNS flood attack allowing all IP addresses?

I notice that the “private-address” is not listed and must be in an external file that is loaded. But I guess that is how you set up this so you can define these local network(s).

But on this topic of adding DNS clients, normally you would declare them in the unbound.conf file. So I wonder what external file you are using/interface to generate the file. Here is an example of a unbound.conf entry for the domain “home.lan” :

# local zone

```
local-zone: "home.lan." static

local-data: "firewall.home.lan. IN A 10.0.0.1"
local-data: "vault.home.lan. IN A 10.0.0.2"
local-data: "media.home.lan. IN A 10.0.0.3"
local-data: "docs.home.lan. IN A 10.0.0.4"
local-data: "wiki.home.lan. IN A 10.0.0.5"

local-data-ptr: "10.0.0.1 firewall.home.lan"
local-data-ptr: "10.0.0.2 vault.home.lan"
local-data-ptr: "10.0.0.3 media.home.lan"
local-data-ptr: "10.0.0.4 docs.home.lan"
local-data-ptr: "10.0.0.5 wiki.home.lan"

```

So what file are you including that is externally generating this? or the real question: what menu is used to add these entries unless editing unbound .conf is the only way?

But unbound is just recursive, so those entries would only work on the router machine itself as far as I understand it.

Is there a way to install bind9 since bind-utils package is installed ?  
bind9 could be easily used. The only additional thing you have to declare is a network or else it would be prone to DNS attacks.

---

<div class="post-metadata">

**Author:** ![dr\_techno](https://community.ipfire.org/user_avatar/community.ipfire.org/dr_techno/32/15388_2.png) [@dr\_techno](https://community.ipfire.org/u/dr_techno)\
**Post date:** [13 September 2024 02:44 UTC](https://community.ipfire.org/t/add-bind9-server-to-ipfire-system/10559/15 "2024-09-13T02:44:05Z")

</div>

> [@bbitsch](#):
>
> How do find the names with BIND? 😉

you declare them as any client you set a name for must be a static IP address. Just like the TLD Dns servers on the internet.

This is the first time I tried the IPFire just try something new. Otherwise, I would load a stripped down Ubuntu Server and run Unbind with bind9 and UFW

Adding and implementing Bind9 wouldn’t be hard. Just have to take the use case in count. But even assigning names in unbound they supposed to be a static ip and not DHCP. DHCP is supposed to be for client devices instead of servers (or embedded servers like printers,NVRs,etc).  
The easy way to add Bind9 to this stack would be adding another static IP (which would be the DNS IP) so Bind9 can use that IP. Then of course you add the bind9 IP into IPFire as a secondary DNS server for the green interface/network.

Btw I like the graphic front end IPFire has refined the unbound program.  
But no one has made a decent graphic front end to bind9 that would be as easy for the local network end user (yet).

One thing I would like to mention is WINS server is dead networking architecture and even the creator of it suggest building a local DNS server for names.

I would like to mention in addition, the Cpu graph doesn’t work. it says "/var/log/rrd/collectd/localhost/cpu-1/cpu-wait.rrd " no such file or directory. Is this designed to be ran on multi-core machines?
