Pihole installation adds second IP address on WAN port

Trying to set up pihole on a router running Ubuntu 20.10. After installing PiHole, I suddenly have a second ip address on the WAN interface. Currently the router is routing between to private ranges (10.0.0.1/24 and 10.0.1.1/24) in a test environment. Something is overriding my netplan config, and I'm not really sure what.

netplan config:

network:
  version: 2
  ethernets:
    enp2s0:
      dhcp4: true
    enp3s0:
      dhcp4: false
      addresses:
        - 10.0.1.1/24

Expected Behaviour:

ip a before pihole install:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc hfsc state UP group default qlen 1000
    link/ether 00:1e:06:45:4d:c6 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.207/24 brd 10.0.0.255 scope global dynamic enp2s0
       valid_lft 86357sec preferred_lft 86357sec
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc hfsc state UP group default qlen 1000
    link/ether 00:1e:06:45:4d:c7 brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.1/24 brd 10.0.1.255 scope global enp3s0
       valid_lft forever preferred_lft forever

Actual Behaviour:

ip a command after pihole install:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1e:06:45:4d:c6 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.207/24 brd 10.0.0.255 scope global dynamic enp2s0
       valid_lft 86389sec preferred_lft 86389sec
    inet 10.0.0.210/24 brd 10.0.0.255 scope global secondary noprefixroute enp2s0
       valid_lft forever preferred_lft forever
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1e:06:45:4d:c7 brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.1/24 brd 10.0.1.255 scope global enp3s0
       valid_lft forever preferred_lft forever

Debug Token:

eak3gu8fhq

Is the WAN interface you mentioned missing from your output?
None of the IPs for the interfaces you show are public, they are either RFC1918 private or loopback addresses.

I am unaware how Ubuntu 20 handles network configuration exactly, but Pi-hole installs dhcpcd5 as a dependency which may very well disagree or conflict with your netplan configuration.

enp2s0 is the WAN interface. I was testing the router withing my home network before exposing to the real internet.

But thank you, removing dhcpcd5 seems to have fixed the problem. Is there any way to make this optional for Ubuntu installations, since it seems to conflict with netplan?

@PromoFaux @DL6ER Can we make dhcpcd5 optional? Like do not install it and do not re-install it on updates?

Can Pi-hole v6.0 be a great opportunity to finally cut off this smoker's leg?

The team is indeed discussing how to handle this specific dependency in a future Pi-hole release. :wink:

For now, it may be safer to just stop and disable dhcpcd5 rather than removing it, to avoid that a Pi-hole update or repair would reinstall it if it's found to be absent (I'm not entirely sure it would, just saying).

1 Like

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