PiHole is a configurable DNS Resolver that typically runs on an external machine such as a Raspberry Pi. It is quite similar in functionality to NAT32's dnsrd, although its various block lists are not as easily configurable.EXAMPLES
NAT32 supports several variables that allow scripts to modify PiHole settings and to interrogate its behaviour:phpwd # The PiHole password phauth # The PiHole authorization string phips # The PiHole IP address string
The following commands can be added to your user.txt file to initialize the above variables:The authorisation string is computed from the configured password by the sha256x command.set phips 192.168.178.200 # PiHole IP address set phpwd password # PiHole password sha256x $phpwd phauth # PiHole auth pihole enable # PiHole DNS enable
To use PiHole as the NAT32 name server for all machines, simply set the DNS Server 1 value in the Interface Configuration dialog box for your Internet-connected interface to the IP address of your PiHole machine (192.168.178.200 in the above example). All computers that resolve names via NAT32 will then use the PiHole. DNS queries are processed first by NAT32 so that NAT32's filter and block lists are honored. All unresolved names are then passed to the PiHole for resolution.
If only certain machines are to resolve names via a PiHole, configure NAT32 to use your router as DNS Server 1. Then, be sure the above commands are executed to initialize the needed variables and enable PiHole functionality. Then execute the following command for each machine that is to use the PiHole:pihole client 192.168.178.168 enable # Host 192.168.178.168 will use PiHole
Enable the PiHole Server Disable the PiHole ServerSEE ALSO
The NAT32 pihole command can also be used to interrogate the PiHole DNS Resolver. The command syntax is:pihole [probe | status | enable | disable | cmd] pihole client [ip [enable | disable]]
Argument cmd can be any of the PiHole commands documented here, with the exception of commands such as getAllQueries that produce very large amounts of output.