Usually my Google-Fu allows me to solve most issues with Linux after enough time, but this one has me stumped.

I recently tried to install Pihole on my Plex box, which is running ubuntu 18.04.2. Everything worked fine, but pihole wasn't able to reliably block the main things I wanted blocked (mainly youtube ads over my roku), so I uninstalled it. Ever since I did that, I've been having DHCP issues with my Plex server.

I've figured out two band-aids to get things working, but I want a proper fix.

  1. I can edit the resolv.conf file to add my router, or cloudflare as a DNS, which fixes all issues.
  2. I can edit the netplan .yaml file to force DHCP on my ethernet device, and then apply the netplan config. This also fixes all issues.

The problem with both of these fixes is they don't persist after reboot. I think something somewhere is going wrong with Network-Manager but I'm not sure what, and I'm not sure how to fix it. I'm guessing it has something to do with PiHole not really having a true "clean" uninstall option.

I've tried the following without success:

  1. Unplug and replug all networking hardware coupled with a restart of the Plex
  2. sudo apt-get -d --reinstall network-manager network-manager-gnome

Upon reboot dig www.google.com is always unsuccessful, and ping -c 3 is always successful. Trying to access google via is always unsuccessful until one of the top fixes is applied.

I'm not quite sure what will be needed to fix this but I appreciate the time of anyone who's reading this. I realize I could probably make something that runs at startup which runs the netplan apply command, but I feel like there's a better solution to this.


EDIT: I added this after another question similar to mine had the output requested.-------------------------- sudo lshw -C network gives:

   description: Ethernet interface
   product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:01:00.0
   logical name: enp1s0
   version: 15
   serial: 30:9c:23:d6:d4:c8
   size: 1Gbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip= latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
   resources: irq:16 ioport:3000(size=256) memory:a1104000-a1104fff memory:a1100000-a1103fff

ifconfig gives:

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet  netmask  broadcast
    inet6 fe80::329c:23ff:fed6:d4c8  prefixlen 64  scopeid 0x20<link>
    ether 30:9c:23:d6:d4:c8  txqueuelen 1000  (Ethernet)
    RX packets 29929  bytes 8095074 (8.0 MB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 46972  bytes 48312760 (48.3 MB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 27784  bytes 41332037 (41.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27784  bytes 41332037 (41.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

cat /etc/netplan/*.yaml gives:

# Let NetworkManager manage all devices on this system
    version: 2
    renderer: NetworkManager
        dhcp4: true

ls -al /etc/resolv.conf gives:

lrwxrwxrwx 1 root root 29 Mar 18 23:47 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

cat /etc/resolv.conf gives:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

search bldint.com
options edns0

dpkg -l dns | grep ii gives:

ii  dns-root-data        2018013001               all          DNS root data including root zone and DNSSEC key
ii  dnsmasq-base         2.79-1                   amd64        Small caching DNS proxy and DHCP/TFTP server
ii  dnsutils             1:9.11.3+dfsg-1ubuntu1.5 amd64        Clients provided with BIND
ii  libdns-export1100    1:9.11.3+dfsg-1ubuntu1.5 amd64        Exported DNS Shared Library
ii  libdns1100:amd64     1:9.11.3+dfsg-1ubuntu1.5 amd64        DNS Shared Library used by BIND
ii  libmicrodns0:amd64   0.0.8-1                  amd64        minimal mDNS resolver and announcer library (shared library)
ii  libnet-dns-perl      1.10-2                   all          Perform DNS queries from a Perl script
ii  libnss-mdns:amd64    0.10-8ubuntu1            amd64        NSS module for Multicast DNS name resolution
ii  python-dnspython     1.15.0-1                 all          DNS toolkit for Python

dpkg -l resolv | grep ii gives:

ii  resolvconf     1.79ubuntu10.18.04.2 all          name server information handler

resolvectl gives:

resolvectl: command not found

UPDATE 1: I've tried removing lighttpd, and running an updated uninstall.sh from pihole. No dice. Additionally, I've amended my *.yaml file to remove the last 3 lines (ethernets, enp1s0, and dhcp4). The amended *.yaml file no longer allows my previous fix to work.

The following is the output from sudo netplan --debug apply for the amended *.yaml file:

** (generate:3099): DEBUG: 19:49:38.200: starting new processing pass
** (generate:3099): DEBUG: 19:49:38.200: Generating output files..
DEBUG:no netplan generated networkd configuration exists
DEBUG:no netplan generated NM configuration exists
DEBUG:Merged config:
  bonds: {}
  bridges: {}
  ethernets: {}
  vlans: {}
  wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:Skipping non-physical interface: enp1s0
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for enp1s0

The following is the output for the original file (which I've now restored) for sudo netplan --debug apply:

** (generate:3258): DEBUG: 19:52:42.231: starting new processing pass
** (generate:3258): DEBUG: 19:52:42.231: enp1s0: setting default backend to 2
** (generate:3258): DEBUG: 19:52:42.231: Generating output files..
** (generate:3258): DEBUG: 19:52:42.231: networkd: definition enp1s0 is not for us (backend 2)
DEBUG:no netplan generated networkd configuration exists
DEBUG:netplan generated NM configuration exists, restarting NM
DEBUG:enp1s0 not found in {}
DEBUG:Merged config:
  bonds: {}
  bridges: {}
      dhcp4: true
  vlans: {}
  wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:device enp1s0 operstate is up, not changing
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for enp1s0

I've been unable to install resolvectl through any of the usual channels.

  • Edit your question and show me ls -al /etc/resolv.conf and cat /etc/resolv.conf and dpkg -l *dns* | grep ii and dpkg -l *resolv* | grep ii and resolvectl. Also, your .yaml file is incorrect. Fixes pending. – heynnema Mar 25 at 0:25
  • Output added. I appear to not have resolvectl. Should I install it for troubleshooting purposes, or is it related to the root of the problem. – BesselFunct Mar 25 at 3:42
  • I took a look at pihole. Oh brother, it really messes with everything. What command did you use to uninstall it? Your .yaml file isn't correct, but we'll come back to that later. – heynnema Mar 25 at 6:44
  • When you say "Trying to access google via is always unsuccessful" what exactly do you mean? Yes, install resolvectl if you can. – heynnema Mar 25 at 7:26
  • I used pihole uninstall which I understand uses their internal script. I left the dependencies the first time I tried it. I recently downloaded the most recent uninstall.sh form their github as I noticed that someone had posted an issue about the uninstaller being incomplete, and ran it again, removing dependencies, including lighttpd. – BesselFunct Mar 25 at 12:40

From the comments...

Work in progess...

Between user mods, and the installation/deinstallation of pihole, networking isn't completely operational.

Recommend the user reinstall Ubuntu, make no mods, don't reinstall pihole.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.