Interesting, your system is still trying to resolve DNS request locally.
14:57:39.628004 lo In IP 127.0.0.1.53185 > 127.0.0.1.53: 43325+ A? google.com. (28)
Did you rebooted the system after removing PiHole?
Interesting, your system is still trying to resolve DNS request locally.
14:57:39.628004 lo In IP 127.0.0.1.53185 > 127.0.0.1.53: 43325+ A? google.com. (28)
Did you rebooted the system after removing PiHole?
Yes, many, many times.
It was PiHole w/ Unbound from dietpi-software which was autoconfigured then uninstalled from dietpi-software months later.
I also have pivpn, dropbear and fail2ban installed currently if that is relevant.
Not sure all the places where dns is defined and the hierarchy of each, so I will post these here just in case.
root@BioDietPi:/etc# cat /etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name-servers 8.8.8.8;
#prepend domain-name-servers 127.0.0.1;
#require subnet-mask, domain-name-servers;
timeout 10;
#retry 4;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/sbin/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
root@BioDietPi:/etc# cat /etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name-servers 8.8.8.8;
#prepend domain-name-servers 127.0.0.1;
#require subnet-mask, domain-name-servers;
timeout 10;
#retry 4;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/sbin/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;
#alias {
# interface "eth0";
# fixed-address 192.5.5.213;
# option subnet-mask 255.255.255.255;
#}
#lease {
# interface "eth0";
# fixed-address 192.33.137.200;
# medium "link0 link1";
# option host-name "andare.swiftmedia.com";
# option subnet-mask 255.255.255.0;
# option broadcast-address 192.33.137.255;
# option routers 192.33.137.250;
# option domain-name-servers 127.0.0.1;
# renew 2 2000/1/12 00:00:01;
# rebind 2 2000/1/12 00:00:01;
# expire 2 2000/1/12 00:00:01;
#}
root@BioDietPi:/etc# cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
BioLabs-DietPi
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# Most distributions have NTP support.
#option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
interface eth0
static ip_address=10.1.0.252/24
static routers=10.1.0.1
static domain_name_servers=10.1.0.1 8.8.8.8
So, I have internet just no name resolution. Not even NPT will update. My machine keeps looking at itself to resolve names. This may be left over from Unbound, but I am not sure what files Unbound changes to set up the recursive DNS server.
Check which resolver is used for the system
cat /etc/resolv.conf; cat /etc/network/interfaces
If there is 127.0.0.1, edit the file and use nameserver 10.1.0.1 which seems to be your ISP router.
root@BioLabs-DietPi:~# cat /etc/resolv.conf; cat /etc/network/interfaces
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 10.1.0.1
nameserver 8.8.8.8
# /etc/resolv.conf.tail can replace this line
# Location: /etc/network/interfaces
# Please modify network settings via: dietpi-config
# Or create your own drop-ins in: /etc/network/interfaces.d/
# Drop-in configs
source interfaces.d/*
# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 10.1.0.252
netmask 255.255.255.0
gateway 10.1.0.1
dns-nameservers 10.1.0.1 8.8.8.8
# WiFi
#allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 9.9.9.9 149.112.112.112
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
root@BioLabs-DietPi:~# nslookup google.com
Server: 10.1.0.1
Address: 10.1.0.1#53
Non-authoritative answer:
Name: google.com
Address: 142.250.115.100
Name: google.com
Address: 142.250.115.139
Name: google.com
Address: 142.250.115.113
Name: google.com
Address: 142.250.115.138
Name: google.com
Address: 142.250.115.102
Name: google.com
Address: 142.250.115.101
Name: google.com
Address: 2607:f8b0:4023:1004::8b
Name: google.com
Address: 2607:f8b0:4023:1004::71
Name: google.com
Address: 2607:f8b0:4023:1004::66
Name: google.com
Address: 2607:f8b0:4023:1004::8a
root@BioLabs-DietPi:~# ping google.com
ping: google.com: Name or service not known
Just out of curiosity does your ipv6 ping work?
strange that some applications like dig and nslookup use the correct DNS server, while other apps like ping still try to reach the localhost one.
can you share
cat /etc/nsswitch.conf
cat /etc/hosts
Also
ping -V; ls -la $(which /bin/ping)
Sorry everyone… looks like I am out of luck until I get on location.
I restarted the network service yesterday and it never came back online.
No SSH. It will not respond to pings.
Still confused. I will save the files before I reimage the sd card and just start over and transfer backup files.
hi,
we did a little bit of brainstorming on your issue. If possible try to keep your system for a while as it’s quite an interesting case
We see you are still running dhcpcd as DHCP daemon. But this is not needed as you have set static ip. Therefore we would recommend to purge the package
apt purge dhcpcd*