It is but you see the button Copy below? Means, if you are on DHCP, and all is working fine, just got to this menu, select STATIC + COPY to continue using the same IP address + DNS settings
You mean I can only accept the DHCP IP address and set that IP as the STATIC IP? I canβt choose my own?
Thatβs not what I tried to say but at least would be a good test to see how it behave if you continue using the IP address assigned via DHCP as STATIC. Would be really interesting.
BINGO! I need to use the copy method to set STATIC IP to get it going!
I reserved an IP address for the virtual ethernet adapterβs MAC address on the router, reboot the VM and then use the copy IP method on Dietpi-Config to set STATIC IP and now nslookup, ping and Dietpi-Software all works!
A million thanks!!!
But do you have an explanation for this?
hard to say. can you create a screen print from dietpi-config network config
Now I notice the difference, the DNS changed to 192.168.0.1
If I change the DNS setting to any built-in DNS entries, exit Dietpi-Config, re-run Dietpi-Software, it stops resolving immediately.
Virtual Machine (x86_64) | IP: 192.168.0.8
ββββββββββββββββββββββββββββββββββββββββββ€ DietPi-Config βββββββββββββββββββββββββββββββββββββββββββ
β Ethernet Details: β
β Usage : Sent = 0 MiB | Recieved = 0 MiB β
β Address : IP = 192.168.0.8 | Mask = 255.255.255.0 | Gateway = 192.168.0.1 | DNS = 192.168.0.1 β
β β
β ββ DHCP/STATIC IP βββββββββββββββββββββββ β
β Change Mode : [STATIC] β
β Copy : Copy current address to "Static" β
β Static IP : [192.168.0.8] β
β Static Mask : [255.255.255.0] β
β Static Gateway : [192.168.0.1] β
β Static DNS : [192.168.0.1] β
β ββ Additional Options βββββββββββββββββββ β
β Link Speed : [100] β
β Disable : Disable Ethernet adapter β
β ββ Apply ββββββββββββββββββββββββββββββββ β
β Apply : Save all changes and restart networking β
β β
β β
β <Ok> <Back>
==
Whenever I ran Dietpi-Software, it takes a long time to get through the following screen if the DNS set to any pre-built DNS entries
and then this
Virtual Machine (x86_64) | IP: 192.168.0.8
βββββββββββββββββββββββββββββββββββββββββ€ DietPi-Software ββββββββββββββββββββββββββββββββββββββββββ
β Checking DNS resolver β
β - Command: ping -c 1 -W 10 dns9.quad9.net β
β - Exit code: 2 β
β - DietPi version: v7.0.2 (MichaIng/master) | HW_MODEL: 20 | HW_ARCH: 10 | DISTRO: 5 β
β - Image creator: DietPi Core Team β
β - Pre-image: Debian mini.iso β
β - Error log: β
β ping: dns9.quad9.net: No address associated with hostname β
β β
β Retry : Re-run the last command that failed β
β DietPi-Config : Edit network, APT/NTP mirror settings etc β
β Open subshell : Open a subshell to investigate or solve the issue β
β Send report : Uploads bugreport containing system info to DietPi β
β ββ Devs only βββββββββββββββββββββββββββββββββββββββ β
β Change command : Adjust and rerun the command β
β β
β β
β <Ok> <Exit>
Extra test shows that as long as if DNS set to 192.168.0.1, then it works, whether itβs set by routerβs DHCP configuration or set by CUSTOM DNS entry. Nothing else works. CUSTOM DNS set to level3 DNS 4.1.1.1 which isnβt on built-in DNS entries doesnβt work either.
I then download and setup Technitium DNS 6.2.1 https://technitium.com/dns/ on Windows machine and point the STATIC DNS IP 192.168.0.21 to it, where I set 9.9.9.9, 8.8.8.8, 8.8.4.4, 1.1.1.1, 1.0.0.1 as forwarders and it works too. It seems that if the STATIC DNS is set to an IP address that will forward its query to upstream DNS then it works.
I either have to accept what it is or move to other distros/platforms. Thanks!
Honestly this has nothing to do with DietPi. DietPi is always sending the DNS request out but somehow it did not get an answer back if you use a global upstream DNS provider. This we already tested using tcpdump Probably this is blocked somewhere. But for sure itβs not something in DietPi or the base image below. At least as long as you donβt install any tcp blocking software. DietPi did not know if you use a local DNS server like your router or a global public DNS server. Simply the configured DNS server is used. To find out what is blocked and where, you would need to continue tracing inside your local network and try to capture DNS packages. Maybe your router is offering such possibilities. As well you could use Wireshark on the computer hosting the VM to see what is going on.
Decided to install Pi-Hole/Unbound on the VM and call it a day.
Hi Joulinar,
I am having exactly the same issue as described in this post. However, whatβs interesting is that the issue is only happening on the dietpi that is deployed onto a NUC as the dietpi version I have deployed on my raspberry pi seems to have no issue to get static IP address via the dietpi-config menu.
As such, I would assume that this is actually an issue with dietpi and not an internal network.
/etc/resolv.conf
definitly contains the configured static DNS server address?
I donβt think so
Can you share your network configuration pls.
ip a
cat /etc/resolv.conf
cat /etc/network/interfaces
I have one working and one which isnβt so letβs see
which config you need - in static and dhcp mode for both the NUC and the RPI4 I assume? so 4 setups?
RPI4 setup through wifi as static
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b8:27:eb:5c:f6:e5 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:09:a3:b0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.46/24 brd 192.168.0.255 scope global dynamic wlan0
valid_lft 842256sec preferred_lft 842256sec
inet6 fe80::ba27:ebff:fe09:a3b0/64 scope link
valid_lft forever preferred_lft forever
4: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet 10.6.0.1/24 scope global wg0
valid_lft forever preferred_lft forever
cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 194.168.4.100
nameserver 194.168.8.100
cat/network/interfaces
# 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 dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 194.168.4.100 194.168.8.100
# 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 194.168.4.100 194.168.8.100
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
As for the NUC in DHCP
root@NUC:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 1c:69:7a:6c:71:e7 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.72/24 brd 192.168.0.255 scope global dynamic eth0
valid_lft 818489sec preferred_lft 818489sec
inet6 fe80::1e69:7aff:fe6c:71e7/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether f8:ac:65:c6:03:b3 brd ff:ff:ff:ff:ff:ff
4: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 500
link/none
inet 100.79.14.71/32 scope global tailscale0
valid_lft forever preferred_lft forever
inet6 fd7a:115c:a1e0:ab12:4843:cd96:624f:e47/128 scope global
valid_lft forever preferred_lft forever
inet6 fe80::8afb:5eea:ce9b:5627/64 scope link stable-privacy
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:a3:98:f0:13 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
root@NUC:~# cat /etc/resolv.conf
# resolv.conf(5) file generated by tailscale
# DO NOT EDIT THIS FILE BY HAND -- CHANGES WILL BE OVERWRITTEN
nameserver 100.100.100.100
search email-at-gmain.com.beta.tailscale.net
root@NUC:~# cat /etc/network/interfaces
# 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 dhcp
address 192.168.0.72
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 100.100.100.100
# 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 100.100.100.100
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
and here is when I changed to static IP with copy IP address option
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 1c:69:7a:6c:71:e7 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.72/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::1e69:7aff:fe6c:71e7/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether f8:ac:65:c6:03:b3 brd ff:ff:ff:ff:ff:ff
4: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 500
link/none
inet6 fe80::3e0:c0ed:c728:1e4/64 scope link stable-privacy
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:78:15:50:39 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
cat /etc/resolv.conf
nameserver 100.100.100.100
cat /etc/network/interfaces
# 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 192.168.0.72
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 100.100.100.100
# 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 100.100.100.100
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Please let me know if you need further outputs.
thanks!
ok lets check what we have.
Are you sure WiFi on RPI4 is set to STATIC? It seems to be a dynamic IP address having a lifetime. Usually this is indicating a DHCP assigned address.
As well WiFi interface is set to DHCP
The RPi4 is using a different DNS server compared to the Nuc. Is that intended that the Nuc is uing Tailscail DNS server?
There is a Tailscail interface, which is not present on the RPi4
Are you able to ping anything on the web once nce the NUC has been set to STATIC? Could you test following on DHCP as well as on STATIC IP?
G_CHECK_NET
Also the RPi4 is using nameservers with private IPs which do not match any IP range of the assigned IP addresses and hence may not be reachable at all. Something is using resolvconf
to set them, but wrongly it seems.
However, setting a static IP to rule out the DHCP server being the culprit is the first step.
At first I thought this was a typo (), but it appears these are Virgin Mediaβs UK-based DNS servers. Are they your ISP? They are probably providing this value to your gateway, which is in turn giving it to the rest of your network.
You may or may not be able to change this default in your router admin interface (depends on who owns the gateway, you or your ISP). Some people appear to be rather unhappy with the Virgin DNS server according to this.
Tailscale sets this value. Setting up βMagicDNSβ in your tailnet (or possibly other DNS settings like βOverride Local DNSβ or βSplit DNSβ according to this thread: DNS Stuck on 100.100.100.100 Β· Issue #3817 Β· tailscale/tailscale Β· GitHub) can set this as the DNS server.
This is not a real nameserver, itβs just a placeholder value Tailscale uses. Itβs no problem when connected to your tailnet, because Tailscale figures out what DNS server should be used based on the configuration you have specified. In your case however, there is something about setting the static IP in the DietPi-Config menu that is breaking Tailscale.
See here, on DHCP you have a Tailscale IP address (100.79.14.71):
On the static setting this value is missing. Something about the DietPi-Config method is removing it, which means you are off of the tailnet and the 100.100.100.100 nameserver can no longer be reached.
If you want this device to have a static IP address, a better way to accomplish that would be to configure a DHCP reservation in your router (or whatever serves DHCP on your network) and leave the DietPi-Config configuration as it is.
Another option would be to change the DNS server (you can do it in the DietPi-Config menu while you are in there setting the static IP address), but this may affect your ability to use Tailscale. A simple tailscale up
might get you back on the tailnet, but if not you might have to uninstall/reinstall after setting the static IP.
Hi as you are running in a virtual machine if its VBOX make sure you have the guest aditions installed. then before you boot into the os go to the settings and then network and check thats turned on. then in the diet pi os make sure ivp 6 is turned off and should boot
Main point is to verify STATIC IP settings once set. They would need to fit to local network and of course it would need to be checked if DNS should be running via Tailscale, as this would require a permanent connection to Tailscale network.
OK thank you for your suggestion BluishHumility.
I have uninstalled Tailscale and setup the Static IP all fine.
My ISP is indeed Virgin Media based in the UKβ¦ and the reason Iβm trying to fiddle with static IP inside the software instead of the Router is because the router doesnβt allow me the change the DNS inside it and I want to use PiHole that is installed within the dietpi image as DHCP server so that I bypass the DNS configβ¦ chicken and egg heyβ¦
Will try to reinstall Tailscale and report if any issue once installed.
Thanks a lot for your help all!