Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

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.

Problems persuading resolvconf to use local bind

Featured Replies

I have set up a server on a nanopi-r2s running Armbian version 5.15.25-rockchip64. It all works fine apart from one thing: while other devices can successfully use BIND on the server, the server itself cannot find the local BIND.

 

If I type in this command host device.localdomain 127.0.0.1 it returns the following:

 

device.localdomain has address 192.168.0.20

 

192.168.0.20 is the correct address for device.localdomain from the local BIND. If I omit the 127.0.0.1  from the command, it does not find the correct address.:

 

device.localdomain has address 36.86.63.182
device.localdomain has address 36.86.63.182
Host device.localdomain not found: 3(NXDOMAIN)

 

The problem seems to be that resolvconf is not adding 127.0.0.1 to resolv.conf. Here is resolv.conf:

 

# Generated by NetworkManager
nameserver 2001:4489:500:102::2
nameserver 2001:4489:506:102::2
nameserver 2001:4488:0:1::76

 

if, just for test purposes, I manually edit /run/resolvconf/resolv.conf to add 127.0.0.1, the host command works without 127.0.0.1. Clearly, the problem is that resolvconf isn't adding the localhost address to resolv.conf. I have tried several different ways to add 127.0.0.1 to resolv.conf. This includes:

 

  • editing /etc/systemd/resolved.conf to add DNS=127.0.0.1
  • editing /etc/default/named to add RESOLVCONF=yes
  • editing /etc/network/interfaces to add dns-nameservers=127.0.0.1

 

None of these methods makes any difference to what appears in resolv.conf.

 

Here are the files:

 

[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
# Google:     8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
# Quad9:      9.9.9.9 2620:fe::fe
DNS= "127.0.0.1"
#FallbackDNS=
#Domains=

The example I found showed the ip address in quotes, as above: I tried without the quotes as well, and that didn't work either.

 

 

#
# run resolvconf?
RESOLVCONF=yes

# startup options for the server
OPTIONS="-u bind"

 

 

# armbian-config created
source /etc/network/interfaces.d/*

# Local loopback
auto lo
iface lo inet loopback
        dns-nameservers 127.0.0.1

# Interface eth0
auto eth0
allow-hotplug eth0
iface eth0 inet static
        address 192.168.100.10
        netmask 255.255.255.0
        gateway 192.168.100.1

# Interface lan0
auto lan0
allow-hotplug lan0
iface lan0 inet static
        address 192.168.0.15
        netmask 255.255.255.0

 

Solved by javalatte

  • Author
  • Solution

I found the solution. in /etc/network/interfaces, the dns-nameservers line has to be on interface lan0 (the internal network).

In addition, lan0 must be defined before eth0 (the external network), otherwise resolvconf will add three ipv6 nameservers and no ipv4 nameservers.

 

# armbian-config created
source /etc/network/interfaces.d/*

# Local loopback
auto lo
iface lo inet loopback
        dns-nameservers 127.0.0.1

# Interface lan0 -must be before eth0, because eth0 generates too many dns-nameservers
auto lan0
allow-hotplug lan0
iface lan0 inet static
        address 192.168.0.15
        netmask 255.255.255.0
        dns-nameservers 127.0.0.1

# Interface eth0
auto eth0
allow-hotplug eth0
iface eth0 inet static
        address 192.168.100.10
        netmask 255.255.255.0
        gateway 192.168.100.1

 

 

 

Guest
This topic is now closed to further replies.

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.