(Based on this Pi-hole as a DHCP / Dual Stack IPv4 & IPv6 and Clients Hostnames + - FritzBox Settings Help )
As of now, we can only set up IPv4 Conditional forwarding, which may not show you the host name on IPv6 addresses, so add an option to let us configure Conditional Forwarding for IPv6 in the web overlay, as manually editing /etc/dnsmasq.d/01-pihole.conf gets dismissed every update.
You can create additional .conf files in the /etc/dnsmasq.d/ folder to pass additional configurations. These files will be read in and applied after a restart, as well they will survive updates.
Mcat12
July 10, 2019, 2:04am
3
This is a feature which will arrive with the new web interface and API:
pi-hole:development
← pi-hole:feature/support-ipv6-conditional-forwarding
opened 10:26PM - 16 Jun 19 UTC
The `rev-server` option in Dnsmasq allows IPv6 addresses, which makes it easy fo… r us to start supporting them in conditional forwarding.
Also renamed the `router_ip` field to `ip`, as it is not necessarily the router's IP.
Related to pi-hole/AdminLTE#924
1 Like
Is in the pipeline with this PR.
pi-hole:devel
← pi-hole:new/rev-server
opened 07:27AM - 09 Apr 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
"Conditional forwarding" can be used to tell FTL to send queries to local devices (either with a local domain) and PTR requests for private ranges to a dedicated device (typically the router of the network) instead of the configured upstreams.
While this works for most users, it is not very flexible, as it implies three severe limitations (assuming the router is `10.1.2.3`):
- It is limited to IPv4
- It automatically assumes a Class D network. i.e. `10.1.2.0/24`. This is often correct (typically for `192.168.x.0/24` networks, but may also be wrong!
- It requires the subnet to be the same Class D network the router is in (this may be a fair assumption, however).
**How does this PR accomplish the above?:**
This PR aims at making conditional forwarding more flexible.
- It supports IPv4 and IPv6
- It adds a dedicated box for the local subnet to be used (can be, e.g., `10.0.0.0/8` in above's example)
- The router can be specified independently of the subnet, it could even be a foreign device (like "ask `13.225.3.2` for all IPs in range `10.0.0.0/8`).

**This feature is intended for Pi-hole v5.1 to ensure we have proper time for testing once it hits `development`**
**What documentation changes (if any) are needed to support this PR?:**
It has to be checked whether/where we document conditional forwarding.
IPv6 conditional forwarding has been implemented in pihole v5.1
https://pi-hole.net/2020/07/15/pi-hole-5-1-released/