From 9d78046fd048f8a08e6cd71dfe74734f3426e7d7 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 5 Feb 2022 11:07:10 +0100 Subject: [PATCH 1/3] Add documentation for new options LOCAL_IPV4/6 and BLOCK_IPV4/6. Deprecate options REPLY_ADDR4/6. Signed-off-by: DL6ER --- docs/ftldns/configfile.md | 41 +++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/ftldns/configfile.md b/docs/ftldns/configfile.md index 75eee83..9b230e5 100644 --- a/docs/ftldns/configfile.md +++ b/docs/ftldns/configfile.md @@ -42,23 +42,29 @@ For this setting, both numbers, the maximum number of queries within a given tim Rate-limiting may be disabled altogether by setting `RATE_LIMIT=0/0` (this results in the same behavior as before FTL v5.7). -#### `REPLY_ADDR4=` (unset by default, PR [#965](https://github.com/pi-hole/FTL/pull/965)) {#reply_addr4 data-toc-label='Force A reply'} +#### `LOCAL_IPV4=` (unset by default, PR [#1293](https://github.com/pi-hole/FTL/pull/1293)) {#local_ipv4 data-toc-label='Force local A reply'} -`FTL` determines the address of the interface a query arrived on. We then use this IP address when replying to queries with an `A` record (IPv4 address). This setting can be used to ensure a fixed, rather than the dynamically obtained, address is used. +By default, `FTL` determines the address of the interface a query arrived on and uses this address for replying to `A` queries with the most suitable address for the requesting client. This setting can be used to use a fixed, rather than the dynamically obtained, address when Pi-hole responds to the following names: -This applies to the following cases: +- `pi.hole` +- `` +- `pi.hole.` +- `.` + +#### `LOCAL_IPV6=` (unset by default, PR [#1293](https://github.com/pi-hole/FTL/pull/1293)) {#local_ipv6 data-toc-label='Force local AAAA reply'} + +Used to overwrite the IP address for local `AAAA` queries. See [`LOCAL_IPV4`](#local_ipv4) for details when this setting is used. + +#### `BLOCK_IPV4=` (unset by default, PR [#1293](https://github.com/pi-hole/FTL/pull/1293)) {#block_ipv4 data-toc-label='Force blocked A reply'} + +By default, `FTL` determines the address of the interface a query arrived on and uses this address for replying to `A` queries with the most suitable address for the requesting client. This setting can be used to use a fixed, rather than the dynamically obtained, address when Pi-hole responds in the following cases: - `IP` blocking mode is used and this query is to be blocked - A regular expression with the [`;reply=IP` regex extension](../regex/pi-hole.md#specify-reply-type) is used -- Pi-hole responds to one of the following names - - `pi.hole` - - `` - - `pi.hole.` - - `.` -#### `REPLY_ADDR6=` (unset by default, PR [#965](https://github.com/pi-hole/FTL/pull/965)) {#reply_addr6 data-toc-label='Force AAAA reply'} +#### `BLOCK_IPV6=` (unset by default, PR [#1293](https://github.com/pi-hole/FTL/pull/1293)) {#block_ipv6 data-toc-label='Force blocked AAAA reply'} -`FTL` determines the address of the interface a query arrived on. We then use this IP address when replying to queries with an `AAAA` record (IPv6 address). This setting can be used to ensure a fixed, rather than the dynamically obtained, address is used. See [`REPLY_ADDR4`](#reply_addr4) for details about when this setting is used. +Used to overwrite the IP address for blocked `AAAA` queries. See [`BLOCK_IPV4`](#block_ipv4) for details when this setting is used. #### `REPLY_WHEN_BUSY=ALLOW|DROP|BLOCK|REFUSE` (PR [#1156](https://github.com/pi-hole/FTL/pull/1156)) {#reply_when_busy data-toc-label='Database busy reply'} @@ -377,4 +383,19 @@ Should FTL translate its own stack addresses into code lines during the bug back Temporary flag that may print additional information. This debug flag is meant to be used whenever needed for temporary investigations. The logged content may change without further notice at any time. +### Deprecated options + +#### `REPLY_ADDR4=` (unset by default, PR [#965](https://github.com/pi-hole/FTL/pull/965)) {#reply_addr4 data-toc-label='Force A reply'} + +*This option is deprecated and may be removed in future versions, please use `BLOCK_IPV4` and `LOCAL_IPV4` instead* + +If neither `BLOCK_IPV4` nor `LOCAL_IPV4` are set, this setting use used to set both of them. If any of the two is set, this setting is ignored altogether. + +#### `REPLY_ADDR6=` (unset by default, PR [#965](https://github.com/pi-hole/FTL/pull/965)) {#reply_addr6 data-toc-label='Force AAAA reply'} + +*This option is deprecated and may be removed in future versions, please use `BLOCK_IPV6` and `LOCAL_IPV6` instead* + +If neither `BLOCK_IPV4` nor `LOCAL_IPV4` are set, this setting use used to set both of them. If any of the two is set, this setting is ignored altogether. + + {!abbreviations.md!} From 995718a0f10053afc3369f83acb451e78e9adb95 Mon Sep 17 00:00:00 2001 From: yubiuser Date: Sat, 12 Feb 2022 22:52:18 +0100 Subject: [PATCH 2/3] Apply suggestions from code review --- docs/ftldns/configfile.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ftldns/configfile.md b/docs/ftldns/configfile.md index 9b230e5..7df1d6d 100644 --- a/docs/ftldns/configfile.md +++ b/docs/ftldns/configfile.md @@ -389,13 +389,13 @@ Temporary flag that may print additional information. This debug flag is meant t *This option is deprecated and may be removed in future versions, please use `BLOCK_IPV4` and `LOCAL_IPV4` instead* -If neither `BLOCK_IPV4` nor `LOCAL_IPV4` are set, this setting use used to set both of them. If any of the two is set, this setting is ignored altogether. +If neither `BLOCK_IPV4` nor `LOCAL_IPV4` are set, this setting is used to set both of them. If either of the two is set, this setting is ignored altogether. #### `REPLY_ADDR6=` (unset by default, PR [#965](https://github.com/pi-hole/FTL/pull/965)) {#reply_addr6 data-toc-label='Force AAAA reply'} *This option is deprecated and may be removed in future versions, please use `BLOCK_IPV6` and `LOCAL_IPV6` instead* -If neither `BLOCK_IPV4` nor `LOCAL_IPV4` are set, this setting use used to set both of them. If any of the two is set, this setting is ignored altogether. +If neither `BLOCK_IPV6` nor `LOCAL_IPV6` are set, this setting is used to set both of them. If either of the two is set, this setting is ignored altogether. {!abbreviations.md!} From 3f24484e72236f4f1b36e46911bb71d15e5e3cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 12 Feb 2022 23:09:21 +0100 Subject: [PATCH 3/3] Adjust blockingmode.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- docs/ftldns/blockingmode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ftldns/blockingmode.md b/docs/ftldns/blockingmode.md index 2de543d..e6be9fc 100644 --- a/docs/ftldns/blockingmode.md +++ b/docs/ftldns/blockingmode.md @@ -47,7 +47,7 @@ Following [RFC 3513, Internet Protocol Version 6 (IPv6) Addressing Architecture, BLOCKINGMODE=IP-NODATA-AAAA ``` -Blocked queries will be answered with the local IPv4 addresses of your Pi-hole (as configured in your `setupVars.conf` file). Blocked AAAA queries will be answered with `NODATA-IPV6` and clients will only try to reach your Pi-hole over its static IPv4 address +Blocked queries will be answered with the local IPv4 addresses of your Pi-hole (see [BLOCK_IP4](configfile.md#block_ipv4) for additional options). Blocked AAAA queries will be answered with `NODATA-IPV6` and clients will only try to reach your Pi-hole over its static IPv4 address ``` ;; QUESTION SECTION: @@ -78,7 +78,7 @@ doubleclick.net. 2 IN A 192.168.2.11 BLOCKINGMODE=IP ``` -Blocked queries will be answered with the local IP addresses of your Pi-hole (as configured in your `setupVars.conf` file) +Blocked queries will be answered with the local IP addresses of your Pi-hole (see [BLOCK_IP4](configfile.md#block_ipv4) and [BLOCK_IP6](configfile.md#block_ipv6) for additional options) ``` ;; QUESTION SECTION: