Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unraid not using DNS server 2

Featured Replies

Hey guys!

 

So my second Unraid server that runs Pihole has a dead motherboard and I figured it's time to set up a backup Pihole instead of using a public DNS service as backup.

 

However at the moment my second DNS server is 1.1.1.1 and Unraid won't use it at all even when the primary DNS server is down.

 

Server was rebooted not too long ago as I thought that would fix it but no luck.

 

Is this a bug in Unraid or do I have to configure something more than just have 2 DNS servers specified?

unraid-diagnostics-20230318-2257.zip

You don't have any DNS servers set up in the config

# Generated settings:
IFNAME[0]="br0"
BRNAME[0]="br0"
BRSTP[0]="no"
BRFD[0]="0"
DESCRIPTION[0]="10G"
BRNICS[0]="eth0"
PROTOCOL[0]="ipv4"
USE_DHCP[0]="yes"
DHCP_KEEPRESOLV="no"
USE_DHCP6[0]="yes"
DHCP6_KEEPRESOLV="no"
SYSNICS="1"

 

  • Author

It's all through DHCP.

Screenshot 2023-03-19 002415.png

Then the problem is with your router / other system / piHole.

 

Your system isn't going to use anything other than the gateway for its DNS Server

  • Author

Like I wrote in the initial post, my Pihole is down and all my other devices are currently using 1.1.1.1 without issues. Only my Unraid is not using the secondary DNS server for some reason.

 

Virtual machines are using DNS 2 and docker containers are still running fine so I assume they are also doing so. It's just the host struggling. ☹️

Looks like in Linux, the name servers are queried in order:

   https://linux.die.net/man/5/resolv.conf

   ...If there are multiple servers, the resolver library queries them in the order listed....

 

I'd adjust your DHCP server so that it doesn't hand out the failing DNS server.

  • Author

After I used nano to see if the /etc/resolv.conf file had any config in it, saving out of habit without modifying anything and closing it, my server does now reach out to the secondary DNS server. Although each request takes about 5 seconds as I'm guessing it's trying to use the primary each time and timing out it works for now.

 

The server log added this so maybe it just needed a refresher:

 

Mar 19 13:10:51 UnRaid dnsmasq[19036]: reading /etc/resolv.conf
Mar 19 13:10:51 UnRaid dnsmasq[19036]: using nameserver 192.168.0.22#53
Mar 19 13:10:51 UnRaid dnsmasq[19036]: using nameserver 192.168.0.23#53

 

 

 

  • Author

Another update.

 

I unplugged and reconnected my server to see if it would update the DNS servers with my backup Pihole.

 

Curiously enough, it only added the first DNS server to resolv.conf and not both even though .22 and .23 are both in the GUI as IPv4 DNS servers.

 

resolv.conf is as follows:

# Generated by dhcpcd from br0.dhcp
domain KTS20
nameserver 192.168.0.22

 

It lost the second DNS server

 

At least now I know how to manually add the second DNS server, so thank you @ljm42 for the link!

 

The log says the following:

 

Mar 19 13:32:07 UnRaid kernel: mlx4_en: eth0: Link Down
Mar 19 13:32:07 UnRaid kernel: br0: port 1(eth0) entered disabled state
Mar 19 13:32:27 UnRaid  avahi-dnsconfd[18816]: DNS Server 192.168.0.22 removed (interface: 7.IPv4)
Mar 19 13:32:27 UnRaid dnsmasq[19036]: no servers found in /etc/resolv.conf, will retry
Mar 19 13:32:27 UnRaid dnsmasq[19036]: reading /etc/resolv.conf
Mar 19 13:32:27 UnRaid dnsmasq[19036]: using nameserver 192.168.0.22#53
Mar 19 13:32:43 UnRaid kernel: mlx4_en: eth0: Link Up
Mar 19 13:32:43 UnRaid kernel: br0: port 1(eth0) entered blocking state
Mar 19 13:32:43 UnRaid kernel: br0: port 1(eth0) entered forwarding state
Mar 19 13:34:16 UnRaid  avahi-dnsconfd[18816]: New DNS Server 192.168.0.22 (interface: 7.IPv4)
Mar 19 13:34:16 UnRaid dnsmasq[19036]: no servers found in /etc/resolv.conf, will retry
Mar 19 13:34:16 UnRaid dnsmasq[19036]: reading /etc/resolv.conf
Mar 19 13:34:16 UnRaid dnsmasq[19036]: using nameserver 192.168.0.22#53

 

 

Your screenshot shows that "IPV4 DNS Server assignment" is set to automatic. I would disable that and just set the specific DNS server you want. Or do it at the DHCP level and set it to just the working DHCP server for your whole network.

  • Author

I ended up changing the IP address of the backup Pihole to the primary for now until I get my second server up and running. Still odd that Unraid doesn't apply both DNS servers to the configuration file from DHCP.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.