pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.36k stars 194 forks source link

Setting "AAAA_QUERY_ANALYSIS=no" doesn't seem to have any effect #250

Closed OneRainbowDev closed 6 years ago

OneRainbowDev commented 6 years ago

In raising this issue, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your issue:

How familiar are you with the codebase?: 3

[BUG | ISSUE] Expected Behaviour:

AAAA_QUERY_ANALYSIS=no
resolve_ipv6=no

After adding these lines to the file and restarting FTL, I'd expect no ipv6 queries to show in the query log/stats.

[BUG | ISSUE] Actual Behaviour: AAAA dns queries are still being shown and responded to according to the query log. chrome_2018-04-05_11-01-21

[BUG | ISSUE] Steps to reproduce: Add the following to /etc/pihole/pihole-ftl.conf and restart FTL.

AAAA_QUERY_ANALYSIS=no
RESOLVE_IPV6=no

Done the following without any effect:

Log file output [if available] Running pihole -d reveals that the settings are actually being loaded into FTL.

   [2018-04-05 00:35:40.805] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
   [2018-04-05 00:35:40.805]    SOCKET_LISTENING: only local
   [2018-04-05 00:35:40.806]    AAAA_QUERY_ANALYSIS: Hide AAAA queries
   [2018-04-05 00:35:40.806]    MAXDBDAYS: max age for stored queries is 365 days
   [2018-04-05 00:35:40.806]    RESOLVE_IPV6: Don't resolve IPv6 addresses
   [2018-04-05 00:35:40.807]    RESOLVE_IPV4: Resolve IPv4 addresses
   [2018-04-05 00:35:40.807]    DBINTERVAL: saving to DB file every minute
   [2018-04-05 00:35:40.807]    DBFILE: Using /etc/pihole/pihole-FTL.db
   [2018-04-05 00:35:40.808]    MAXLOGAGE: Importing up to 24.0 hours of log data
   [2018-04-05 00:35:40.808]    PRIVACYLEVEL: Set to 0

Device specifics

Hardware Type: Raspberry Pi, Model B Gen 1 (Arm6) OS: Raspbian Stretch;

Have to manually build updates from git because of issue #244. Last done yesterday evening. Was initially just trying to hide the ipv6 requests from stats/query log since I do not have a ipv6 router.

This template was created based on the work of udemy-dl.

technicalpyro commented 6 years ago

you still see the AAAA queries because the devices are still trying to make them as far as the status or returns that could be down to the backwards compatability baked into IPv6

OneRainbowDev commented 6 years ago

This says that adding AAAA_QUERY_ANALYSIS=no should hide the AAAA queries from the log, though of course they still occur in the background.

I would have expected RESOLVE_IPV6=no to deny all ipv6 queries though.

OneRainbowDev commented 6 years ago

Ah, made a mistake with the title and example commands there, the actual file on the raspi is pihole-FTL.conf, and it is loading the right settings according to the logs.

DL6ER commented 6 years ago

Yeah, I see this now. Looking at the code, everything seems fine. I'll try it myself in a bit.

DL6ER commented 6 years ago

Okay, there was a space where it shouldn't have been. I fixed this in 1d6a339969e1585246a47adf6a2d99a543561c12. I also disabled importing of AAAA queries from the databse (on startup) if this setting is set (003371fcd3a7541bffad911e858ab78c745f35d9).

Unfortunately, you will have to clone and compile the most recent version now.

OneRainbowDev commented 6 years ago

Rebuilt the binary (make caches stuff) and it works perfectly, thanks!

DL6ER commented 6 years ago

I was more worried that you might have to rebuild the sqlite module. I had to do it today and it took like 5 minutes even on a Raspberry Pi v3...

OneRainbowDev commented 6 years ago

Ah that, I did that yesterday, took about 15 minutes...