Pi-hole doesn't set up a static IP for itself (Armbian)


Please follow the below template, it will help us to help you!

This week, I would pass to my second project step. Active the pihole for all my network.
I disabled my DHCP on my router and enabled DHCP on my pihole with the same settings.
The pihole DHCP worked fine. I tested it with some DHCP release + renew command on my device.

However after the old router’s leases were gone, there is not net for every device. Consequently, I set up a static IP on my PC to investigate. I just see the gateway and my PC on the network. Pihole was unreachable like the other.

I tried to reconfigure the static-ip without success:

  1. By the pihole:

sudo pihole -r

  1. By the network interface:

sudo vi /etc/network/interfaces

auto eth0
iface eth0 inet static

Expected Behaviour:

Pihole must set up its ip alone.

Actual Behaviour:

Without my dhcp router, Pihole isn’t able to set IP for itself.

Debug Token:

I have no keyboard, that why I made this log with my router DHCP on to enable my ssh connexion.


Pi-hole sets a static IP address automatically via /etc/dhcpcd.conf.
Change the DHCP range to not include the Pi-hole’s IP address.


Thanks, for your proposal.
Unfortunately, It doesn’t solve my issue…


I finally let active my DHCP router just with a range of 2 IP (It was the minimum).The pihole gets its static IP in this way (I set up a MAC rule on the router just to be sure).

By luck, the pihole is faster than my router to give IP addresses to the other devices. It isn’t the best solution. However it seems to do the job.


My quick and dirty solution doesn’t work at all.
However the pi-hole with dhcp mode has works well for ~1 week. After it dispare of network. A reboot and it works again. Strange… I will buy a keyboard to get a log with a local terminal.


If Raspbian Stretch, dhcpcd sets the static IP.
Its not done through the interfaces config file anymore (change it back to manual):

pi@noads:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

IP etc can be configured in the /etc/dhcpcd.conf file:

pi@noads:~ $ tail -5 /etc/dhcpcd.conf
interface eth0
  static ip_address=
  static routers=
  static domain_name_servers=

See man dhcpcd.conf for syntax and more options.

Purchased a new router and now Pi-hole has no internet

I’am on Armbian Stretch.
The dhcpd conf file was one of first things. When i checked, it was ok, in my remember.
To be sure, I will check again.


I has backed to manual config. Sadly the pihole was still unreachable after some days.
Furthermore, Time between 2 downtime seem smaller :-/
I don’t understand, the root cause…


I’ve had similar experiences with Armbian, and I have not yet found the issue. I first thought it was due to the ramlog for logfiles, but I don’t think that is the root issue.


Symptoms, DNS resolution fails, SSH fails, but ping responds.


My symptoms is bit differents:
DHCP fails, SSH fails, ping fails, but DNS seem ok


I’ve seen exactly that as well. I really can’t figure it out. Happens on a NanoPi Neo, and a NanoPi M1+. Going to try a new OS and see if that changes things.

closed #13

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.