I have a server with TrueNAS Core installed and an Ubuntu server vm running on it. I rebooted the vm and now suddenly it can't reach the outside. When I do ping www.google.com
, it says ping: www.google.com: Temporary failure in name resolution
. When I do ping 172.217.168.196
, it works. So the dns part isn't working. When I do cat /etc/netplan/00-installer-config.yaml
, this is the output:
# This is the network config written by 'subiquity'
network:
ethernets:
enp0s4:
addresses:
- 192.168.2.15/24
gateway4: 192.168.2.1
nameservers:
addresses:
- 1.1.1.1
search: []
version: 2
I've tried it with ufw disabled, and with the nameserver changed to 192.168.2.15 (the pihole + unbound running on the vm). Both didn't help. However, my win10 computer also uses the pihole as it's dns server and my win10 computer works fine. I'm also running an openvpn server on it and the clients can also reach www.google.com fine (the dns server for the clients is also set as the pihole). ping 1.1.1.1
did work; just wanted to make sure cloudflare didn't have a malfunction.
So it has to do specifically with the server itself, as all other clients and such that use the server work fine. However I just don't know what to do anymore.
Try
vi /etc/resolv.conf
and addnameserver 1.1.1.1
I was having the same issue with Ubuntu server VMs and that fixed it. I'm not sure how to make it persistent after a reboot though.