-1

Info:im running pihole in a docker on my server

I tried to set a static ip on my Ubuntu Server im running (Ubuntu Server 20.4 LTS). I wanted to set a static ip address and I followed a tutorial where someone explained how to do that wit netplan so I had to work on a file/create one. The file was called 01-network-manager-all.yaml and was in the Netplan directory.

This is what I had to write

# Let networkd manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp3s0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.178.88/24]
      gateway4: 192.168.1.1
      nameservers:
          addresses: [8.8.8.8,8.8.4.4]

now I can't update anything can't download anything can't do nothing after that I tried configuring the dns server in a different way and followed this forum post

[https://askubuntu.com/questions/346838/how-do-i-configure-my-dns-settings-in-ubuntu-server][1]

now nothing works and I would like to reset my networkconfig

  • 1
    I guess sudo dpkg-reconfigure <package> would reset the configuration. In your case the package might be networking. – france1 Oct 09 '21 at 16:59
  • You do NOT have a GUI on this server, correct? Edit your question and show me cat /etc/network/interfaces and sudo lshw -C network and ls -al /etc/netplan. – heynnema Oct 09 '21 at 22:25

1 Answers1

0

In the file 01-network-manager-all.yaml remove all except this lines:

network:
  version: 2
  renderer: NetworkManager

and execute

sudo netplan generate
sudo netplan try

This should revert your changes until reboot.