Mhhh... something seems wrong. The command doesn't initiate anything in the log and doesn't terminate - terminal is still executing.
But in the log I see periodic (1 minute) attempts to resolve client host names (but 20 custom DNS entries are set)
[2020-02-15 08:41:00.113 24651] 0 / 10 client host names resolved
[2020-02-15 08:41:00.113 24651] 0 / 1 upstream server host names resolved
[2020-02-15 08:41:22.943 24651] **** new UDP query[A] "www.google.com" from 10.0.30.254 (ID 15, FTL 8907, src/dnsmasq/forward.c:1571)
[2020-02-15 08:41:22.943 24651] www.google.com is known as not to be blocked
[2020-02-15 08:41:22.943 24651] **** got cache answer for www.google.com / 216.58.207.68 / <unknown> (ID 15, src/dnsmasq/rfc1035.c:1762)
[2020-02-15 08:41:22.944 24651] **** new UDP query[AAAA] "www.google.com" from 10.0.30.254 (ID 16, FTL 8908, src/dnsmasq/forward.c:1571)
[2020-02-15 08:41:22.944 24651] www.google.com is known as not to be blocked
[2020-02-15 08:41:22.944 24651] **** got cache answer for www.google.com / 2a00:1450:4001:825::2004 / <unknown> (ID 16, src/dnsmasq/rfc1035.c:1762)
[2020-02-15 08:41:40.129 24651] **** new UDP query[A] "beacons4.gvt2.com" from 10.0.1.136 (ID 17, FTL 8909, src/dnsmasq/forward.c:1571)
[2020-02-15 08:41:40.130 24651] beacons4.gvt2.com is not known
[2020-02-15 08:41:40.130 24651] Blocking beacons4.gvt2.com as domain is regex blacklisted
[2020-02-15 08:42:00.176 24651] 0 / 10 client host names resolved
[2020-02-15 08:42:00.176 24651] 0 / 1 upstream server host names resolved
[2020-02-15 08:42:01.991 24651] **** new UDP query[A] "clients4.google.com" from 10.0.1.136 (ID 19, FTL 8910, src/dnsmasq/forward.c:1571)
[2020-02-15 08:42:01.992 24651] clients4.google.com is not known
[2020-02-15 08:42:01.993 24651] **** forwarded clients4.google.com to 127.0.0.1 (ID 19, src/dnsmasq/forward.c:558)
[2020-02-15 08:42:02.122 24651] **** got DNSSEC details for clients4.google.com: 2 (ID 19, src/dnsmasq/forward.c:1254)
[2020-02-15 08:42:02.123 24651] clients4.google.com is known as not to be blocked
[2020-02-15 08:42:02.123 24651] CNAME clients4.google.com
[2020-02-15 08:42:02.123 24651] **** got reply clients4.google.com is (CNAME) (ID 19, src/dnsmasq/cache.c:487)
[2020-02-15 08:42:02.123 24651] clients.l.google.com is not known
[2020-02-15 08:42:02.123 24651] CNAME clients4.google.com ---> clients.l.google.com
[2020-02-15 08:42:02.124 24651] **** got reply clients.l.google.com is 216.58.208.46 (ID 19, src/dnsmasq/cache.c:487)
[2020-02-15 08:42:23.091 24651] **** new UDP query[A] "calendar.google.com" from 10.0.1.136 (ID 120, FTL 8911, src/dnsmasq/forward.c:1571)
[2020-02-15 08:42:23.091 24651] calendar.google.com is not known
[2020-02-15 08:42:23.092 24651] **** forwarded calendar.google.com to 127.0.0.1 (ID 120, src/dnsmasq/forward.c:558)
[2020-02-15 08:42:23.093 24651] **** got DNSSEC details for calendar.google.com: 2 (ID 120, src/dnsmasq/forward.c:1254)
[2020-02-15 08:42:23.093 24651] calendar.google.com is known as not to be blocked
[2020-02-15 08:42:23.093 24651] CNAME calendar.google.com
[2020-02-15 08:42:23.094 24651] **** got reply calendar.google.com is 172.217.18.110 (ID 120, src/dnsmasq/cache.c:487)
[2020-02-15 08:42:27.764 24651] **** new UDP query[A] "www.google.com" from 10.0.30.254 (ID 121, FTL 8912, src/dnsmasq/forward.c:1571)
[2020-02-15 08:42:27.764 24651] www.google.com is known as not to be blocked
[2020-02-15 08:42:27.765 24651] **** got cache answer for www.google.com / 216.58.207.68 / <unknown> (ID 121, src/dnsmasq/rfc1035.c:1762)
[2020-02-15 08:42:27.766 24651] **** new UDP query[AAAA] "www.google.com" from 10.0.30.254 (ID 122, FTL 8913, src/dnsmasq/forward.c:1571)
[2020-02-15 08:42:27.766 24651] www.google.com is known as not to be blocked
[2020-02-15 08:42:27.766 24651] **** got cache answer for www.google.com / 2a00:1450:4001:825::2004 / <unknown> (ID 122, src/dnsmasq/rfc1035.c:1762)
[2020-02-15 08:42:29.084 24651] **** new UDP query[A] "ssl.gstatic.com" from 10.0.1.136 (ID 123, FTL 8914, src/dnsmasq/forward.c:1571)
[2020-02-15 08:42:29.084 24651] ssl.gstatic.com is known as not to be blocked
[2020-02-15 08:42:29.084 24651] **** got cache answer for ssl.gstatic.com / 172.217.16.131 / <unknown> (ID 123, src/dnsmasq/rfc1035.c:1762)
[2020-02-15 08:42:40.129 24651] **** new UDP query[A] "beacons.gcp.gvt2.com" from 10.0.1.136 (ID 124, FTL 8915, src/dnsmasq/forward.c:1571)
[2020-02-15 08:42:40.130 24651] beacons.gcp.gvt2.com is not known
[2020-02-15 08:42:40.131 24651] Blocking beacons.gcp.gvt2.com as domain is regex blacklisted
[2020-02-15 08:43:00.241 24651] 0 / 10 client host names resolved
[2020-02-15 08:43:00.241 24651] 0 / 1 upstream server host names resolved
Make sure you have the right quotation marks. Sometimes copy-paste from this forum into the terminal creates "nice" quotation marks. The terminal usually doesn't understand them and acts up.
Bad:
FTL does only try to resolve the hostnames for those clients it knows of to reduce the total number of lookups. It doesn't need to know the host names for devices that are not in any of its tables. If such a devices shows it, FTL will do the lookup when it needs the name.
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Dnsmasq config for Pi-hole's FTLDNS
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
###############################################################################
# FILE AUTOMATICALLY POPULATED BY PI-HOLE INSTALL/UPDATE PROCEDURE. #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
# #
# IF YOU WISH TO CHANGE THE UPSTREAM SERVERS, CHANGE THEM IN: #
# /etc/pihole/setupVars.conf #
# #
# ANY OTHER CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE #
# WITHIN /etc/dnsmasq.d/yourname.conf #
###############################################################################
addn-hosts=/etc/pihole/local.list
addn-hosts=/etc/pihole/custom.list
localise-queries
no-resolv
cache-size=10000
log-queries
log-facility=/var/log/pihole.log
local-ttl=2
log-async
server=127.0.0.1#5353
domain-needed
bogus-priv
dnssec
trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
interface=eth0
server=/use-application-dns.net/
No, this just means to not use the upstream servers specified in /etc/resolv.conf.
So you removed it but FTL still knows about it? This is very strange. Have you restarted your machine in between? If not, please try this and check again if the unifi comes up again.
Not sure if it has anything to do with your problem, but I would generally stay away from underscores in hostnames - may cause you grief somewhere, even if pihole has no issue with it Hostname - Wikipedia
Thanks for the hint. I changed all underscores to minus. Still not working.
The "_gateway" is set automatically by the device as I can see this hostname in the network overview. I set a custom DNS for it (without underscore).
# Generated by NetworkManager
#nameserver 8.8.8.8
#nameserver 10.0.1.1
nameserver 127.0.0.1
Restart FTL:
sudo service pihole-FTL restart
And check in the browser again.
If this shows correct hostnames, you need to configure DNS in network-manager to only use one DNS server 127.0.0.1 and not the others (8.8.8.8, 10.0.1.1).
The GUI uses the nameservers defined in resolv.conf to display names instead of IP's.
I dont think its solved as this resolv.conf file will probably change back to previous state after a reboot.
Try reboot and see if your changes survived ? network-manager populates this resolv.conf file so need to look in NM and set only one DNS server 127.0.0.1