Request: Client Name

Can't the web GUI just replace IPs with what's in custom.list without the need to actual resolve them?

1 Like

As /etc/hosts is always checked one solution might be to add custom DNS entries via web interface to that file?

That would need root level access for the web interface to access. I'm not very comfortable with that.

Yes, but it is only a partial solution. It's already pretty later over here, I'll check it out sometime this week.

No. You need rootprivileges to edit this file. The web interface has too low permissions to do this. We will not change this as this would an enormous amount of security holes.

1 Like

Agree with that.

@yubiuser You're still on the branch tweak/more_resolve_details, right?
I did a modification to the internal FTL resolver than may work even without 127.0.0.1 in /etc/resolv.conf.
It may not be the final solution, however, it is something worthwhile testing I've found whilst digging deeply through the Linux network security services (nss).

I'd highly appreciate any testing on this.

2 Likes

I wasn't but I changed back, restored my previous network manager config (without 127.0.0.1 as ipv4 DNS) and reactivated DEBUG output.

tl;dr: It worked!

nanopi@nanopi:~$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 8.8.8.8
nanopi@nanopi:~$ echo ">reresolve >quit" | nc 127.0.0.1 4711
[2020-02-19 09:33:16.557 2841] Received API request to re-resolve host names
[2020-02-19 09:33:16.594 2841] Resolver: 10.0.1.64 ---> "ipad" (previously "ipad")
[2020-02-19 09:33:16.595 2841] **** new UDP query[PTR] "254.30.0.10.in-addr.arpa" from 127.0.0.1 (ID 280, FTL 9246, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.595 2841] 254.30.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.595 2841] **** got cache answer for chromecast-wohnzimmer / 10.0.30.254 / /etc/pihole/custom.list (ID 280, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.596 2841] Resolver: 10.0.30.254 ---> "chromecast-wohnzimmer" (previously "chromecast-wohnzimmer")
[2020-02-19 09:33:16.596 2841] **** new UDP query[PTR] "215.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 281, FTL 9247, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.596 2841] 215.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.597 2841] **** got cache answer for Marie-Windows-Phone / 10.0.1.215 / /etc/pihole/custom.list (ID 281, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.597 2841] Resolver: 10.0.1.215 ---> "marie-windows-phone" (previously "marie-windows-phone")
[2020-02-19 09:33:16.597 2841] **** new UDP query[PTR] "2.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 282, FTL 9248, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.597 2841] 2.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.598 2841] **** got cache answer for cloudkey / 10.0.1.2 / /etc/pihole/custom.list (ID 282, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.598 2841] Resolver: 10.0.1.2 ---> "cloudkey" (previously "cloudkey")
[2020-02-19 09:33:16.598 2841] Resolver: 127.0.0.1 ---> "localhost" (previously "localhost")
[2020-02-19 09:33:16.598 2841] **** new UDP query[PTR] "1.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 283, FTL 9249, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.599 2841] 1.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.599 2841] **** got cache answer for usg / 10.0.1.1 / /etc/pihole/custom.list (ID 283, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.599 2841] Resolver: 10.0.1.1 ---> "usg" (previously "usg")
[2020-02-19 09:33:16.599 2841] **** new UDP query[PTR] "84.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 284, FTL 9250, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.600 2841] 84.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.600 2841] **** got cache answer for Marie-Laptop / 10.0.1.84 / /etc/pihole/custom.list (ID 284, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.600 2841] Resolver: 10.0.1.84 ---> "marie-laptop" (previously "marie-laptop")
[2020-02-19 09:33:16.600 2841] **** new UDP query[PTR] "3.40.0.10.in-addr.arpa" from 127.0.0.1 (ID 285, FTL 9251, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.601 2841] 3.40.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.601 2841] **** got cache answer for wireguard-sony-xz-compact / 10.0.40.3 / /etc/pihole/custom.list (ID 285, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.601 2841] Resolver: 10.0.40.3 ---> "wireguard-sony-xz-compact" (previously "wireguard-sony-xz-compact")
[2020-02-19 09:33:16.601 2841] **** new UDP query[PTR] "6.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 286, FTL 9252, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.603 2841] 6.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.603 2841] **** got cache answer for omv / 10.0.1.6 / /etc/pihole/custom.list (ID 286, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.603 2841] Resolver: 10.0.1.6 ---> "omv" (previously "omv")
[2020-02-19 09:33:16.604 2841] **** new UDP query[PTR] "4.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 287, FTL 9253, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.604 2841] 4.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.604 2841] **** got cache answer for access-point / 10.0.1.4 / /etc/pihole/custom.list (ID 287, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.604 2841] Resolver: 10.0.1.4 ---> "access-point" (previously "access-point")
[2020-02-19 09:33:16.604 2841] **** new UDP query[PTR] "190.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 288, FTL 9254, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.605 2841] 190.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.605 2841] **** got cache answer for Sony-XZ1-Compact / 10.0.1.190 / /etc/pihole/custom.list (ID 288, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.605 2841] Resolver: 10.0.1.190 ---> "sony-xz1-compact" (previously "sony-xz1-compact")
[2020-02-19 09:33:16.605 2841] **** new UDP query[PTR] "182.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 289, FTL 9255, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.605 2841] 182.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.606 2841] **** got cache answer for Thinkpad-Wifi / 10.0.1.182 / /etc/pihole/custom.list (ID 289, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.606 2841] Resolver: 10.0.1.182 ---> "thinkpad-wifi" (previously "thinkpad-wifi")
[2020-02-19 09:33:16.606 2841] **** new UDP query[PTR] "136.1.0.10.in-addr.arpa" from 127.0.0.1 (ID 290, FTL 9256, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.606 2841] 136.1.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.606 2841] **** got cache answer for Thinkpad-LAN / 10.0.1.136 / /etc/pihole/custom.list (ID 290, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.607 2841] Resolver: 10.0.1.136 ---> "thinkpad-lan" (previously "thinkpad-lan")
[2020-02-19 09:33:16.607 2841] **** new UDP query[PTR] "2.40.0.10.in-addr.arpa" from 127.0.0.1 (ID 291, FTL 9257, src/dnsmasq/forward.c:1571)
[2020-02-19 09:33:16.607 2841] 2.40.0.10.in-addr.arpa is known as not to be blocked
[2020-02-19 09:33:16.607 2841] **** got cache answer for wireguard-thinkpad / 10.0.40.2 / /etc/pihole/custom.list (ID 291, src/dnsmasq/rfc1035.c:1517)
[2020-02-19 09:33:16.607 2841] Resolver: 10.0.40.2 ---> "wireguard-thinkpad" (previously "wireguard-thinkpad")
[2020-02-19 09:33:16.607 2841] 14 / 14 client host names resolved
[2020-02-19 09:33:16.608 2841] Resolver: 127.0.0.1 ---> "localhost" (previously "localhost")
[2020-02-19 09:33:16.608 2841] 1 / 1 upstream server host names resolved
[2020-02-19 09:33:16.608 2841] Done re-resolving host names

Thanks for this great work.

3 Likes