I know pihole only can process lists, using specifically formatted DNS /URL entries. These lists are added to /etc/pihole/adlists.list.
There are several lists on the web with only IP addresses, such as, but not limited to, the talos list, the firehole list, ...
I was wondering if pihole-FTL could be modified to check these IP's, right before returning the resolved address to the client, replacing it with the appropriate IP address for blocking, if found on the list.
Example
-
assume
ssl.google-analytics.com
isn't on any blocklist. Pihole-FTL would resolve and return172.217.17.72
to the client, since the domain is NOT on any list. -
before returning the address
172.217.17.72
to the client, a check should be made if that address is on theIPgravitylist
-
if that address is on the
IPgravitylist
, pihole-FTL should return0.0.0.0
OR::
OR the pihole IP address, depending on the blocking mode. -
there could be an
IPlists.list
, same format as/etc/pihole/adlists.list
-
there should be parsing logic, to ensure the resulting
IPgravitylist
contains only valid IP addresses. -
The resulting
IPgravitylist
could be a new table in the database, ensuring searches are fast enough to avoid performance loss.
Currently, I'm using these IP lists on my pfsense box, using the IP list feature of pfBlockerNG. The result of using these list, is a firewall rule that simply blocks the IP's. The downside of this method is a noticeable delay in pageloads, as the request simply times out. Pihole-FTL responding with a appropriate address to the request, could eliminate this timeout.
I haven't been able to find any network wide product, capable of producing a valid DNS response, based on both DNS and IP lists. This would be a first...
@DL6ER: I've already asked this question to Simon several weeks ago, but did NOT get a reply. Apparently, there isn't much going on in the dnsmasq development, since v2.80.