0

I thought it would be a good idea to install pihole on my ubuntu 18.04 server to block ads for my home network. However when I did that, all networking stopped. So I uninstalled pihole by removing the recommended directories on the server (and then rebooted).

So now my system has no notion of pihole, I can SSH and VNC (GUI) into the server, but nothing can get out.

Networking (ifconfig) output looks like this:

ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1460
    inet 10.152.0.2  netmask 255.255.255.255  broadcast 0.0.0.0
    inet6 fe80::4001:aaf:fe98:2  prefixlen 64  scopeid 0x20<link>
    ether 42:01:0a:98:01:02  txqueuelen 1000  (Ethernet)
    RX packets 52675  bytes 4336857 (4.3 MB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 83573  bytes 66763505 (66.7 MB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I notice that the broadcast is set to 0.0.0.0, should it be set this way? Other machines on that network have it set to the same as the internal IP. Here are my firewall (ufw) rules. That link is actually the server thats having this problem :)

Output of /etc/resolv.conf is:

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
search google.internal

One other thing to note is that the output of /etc/network/interfaces is:

# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown

(not sure if thats relevant or not)

1
  • Also, the server is a Google Compute VM
    – kurdtpage
    Dec 1, 2020 at 19:44

1 Answer 1

2

Editing /etc/resolv.conf is only a short term solution, it is NOT persistent. The solution is to edit /etc/netplan/50-cloud-init.yaml and paste the following:

network:
    version: 2
    ethernets:
        ens4:
            dhcp4: true
            nameservers:
                addresses: [1.1.1.1, 8.8.8.8]
            set-name: ens4

Make sure you use 4 spaces, not tabs when editing this YAML file. Then run sudo netplan apply to save changes.

Sources: ricmedia and linuxize

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .