mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Add section for logging queries with client IPs
parent
f732edd79c
commit
2d5d7ef226
1 changed files with 17 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
* [Package installation (Basic)](#package-installation-basic)
|
||||
* [Manual installation (Advanced)](#manual-installation-advanced)
|
||||
* [Recommended tweaks](#recommended-tweaks)
|
||||
* [Logging DNS queries with client IPs](#logging-dns-queries-with-client-ips)
|
||||
* [Verifying the configuration](#verifying-the-configuration)
|
||||
|
||||
## Which method to use?
|
||||
|
@ -231,6 +232,22 @@ And reload Firewall: `/etc/init.d/firewall reload`
|
|||
|
||||
**Note:** Alternatively, if you are using the [adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files) package you can enable the `Force Local DNS` option which will create these rules automatically for you.
|
||||
|
||||
## Logging DNS queries with client IPs
|
||||
|
||||
`dnscrypt-proxy` can [log queries](https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Logging), but in this OpenWrt configuration it cannot log the requesting client IP address because `dnsmasq` is forwarding the request to `dnscrypt-proxy`. It can be helpful to know the requesting client IP in order to identify which device is making a particular DNS query. This can be achieved by enabling query logging in `dnsmasq` as follows:
|
||||
|
||||
```sh
|
||||
config dnsmasq
|
||||
# equivalent to --log-queries=extra in dnsmasq
|
||||
option logqueries '1'
|
||||
# where to write log file to
|
||||
option logfacility '/tmp/dnsmasq_queries.log'
|
||||
```
|
||||
```
|
||||
/etc/init.d/dnsmasq restart
|
||||
```
|
||||
**Note:** These logs accumulate quickly so it is recommended to write to an external share or storage device as embedded devices have limited flash write cycles and storage space.
|
||||
|
||||
## Verifying the configuration
|
||||
|
||||
#### Check that you are not using your ISP resolver any more:
|
||||
|
|
Loading…
Add table
Reference in a new issue