Issue: Speedport DHCPv6 ra-param Pi-Hole DNS IPv6

Hello/Hallo

Greetings from Germany,

I hope you can help me, it is about the Speedport Smart and IPv6, I think I found another approach on how to solve the problem, would be glad to have your help, the Issue is on github, wanted to make sure you guys also know about it :slight_smile:

Hope this is the right way (don´t want to be blocked or so by admins in the blog/forum).

https://github.com/pi-hole/pi-hole/issues/2051

1 Like

I have a Speedport (Hybrid) too. Although I don't have the technical knowledge to talk about this topic, thanks for sharing. Let's wait for a response by the experts.

Does your router "advert" for the dhcpv6 include DNS specifically ?

If it doesn't, you can use the program radvd on your pi to advertise DNS only based, on RDNSS

This is supported on win10, ios, linux and android 5+ (although there currently a known issue in win10 that it will only pick the DNS if there is no ipv4 option)

Can I somehow Check that?

Witz wireshark or tcpdump dont know Form what to filter.

Ich believe my router sends his DNS ipv6 (but I dont know). The solving would be that only the dns of the Pi gets send with Higher priority.

Android doesnt Support dhcpv6 so another was (slaac? should be used)

I don't have trouble with this, because I've disabled IPv6-DNS in the router via the engineer menu (browser add-on Tampermonkey + script needed). But would be good if there is a better way to "overwrite" this router behavior.

RDNSS does not need DHCPv6 to function and is confirmed on android 5+. it doesn't hurt to just try i guess. Do the following on your pi:

sudo apt-get install radvd
sudo nano /etc/radvd.conf

example config:

interface eth0
{
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
RDNSS #ipv6-adres-of-your-pi-here
{
AdvRDNSSLifetime 20;
};
};

ctrl-x
Y

sudo systemctl start radvd

That is the config i use. of course, replace "#ipv6-of..." with the ipv6 adres of your pi-hole to have the pi-hole defined as your DNS through RDNSS. Not sure if this conflicts with the ra setting in dnsmasq, which i don't use. You might need to experiment a bit, but it works for my use-case.

Thank you, tried your configuration, but stilll my PCs get the DNS Ipv6 from the Router (probably via DHCPv6).

Is there a way to make the Raspberry send with high priority but only the DNS and not itself as the Gateway or that the clients still get the prefix of the Router?

Have you checked the advertisements work as a first step ( you can run radvdump to check advertisements are getting sent)

sudo radvdump

if they are, you might indeed have a problem with overriding the dhcpv6. you might try to add the following in the rdnss section of the config (under advrdnslifetime):

AdvRDNSSPreference 15;

although, as far as i know, only linux (and maybe apple) allows preferences to be sent. 15 sends out at the highest preference. be sure to stop and start radvd after the change or it will only pick up on it after a reboot. Not sure if the preference shows up on radvdump.

Radvd is "the" solution for sending out additional DNS. most of the other solutions are a lot more messy, but maybe someone else still had an idea

The Output was:

radvd configuration generated by radvdump 1.9.1

based on Router Advertisement from fe80::1bf2:525xxxxx (Maybe Router?)

received by interface eth0

interface eth0
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag off;
AdvOtherConfigFlag off;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 30;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvSourceLLAddress on;

    RDNSS fd55:6973:4046:1:e0cd:55e1:xxxx:xxxx    (the ula of my Pi I believe)                                                
    {                                                                                             
            AdvRDNSSLifetime 20;                                                                  
    }; # End of RDNSS definition                                                                  

}; # End of interface definition

Ok, the FE80 is the link address of eth0 probably.

ifconfig

should list it (every port in an IPv6 network has a FE80 address). You can add the priority line i described in my previous post and see if that helps. This same config works in my SLAAC based network (without the additional priority line). Although i use a fully routable address (not sure if that could be an issue).

It is the only solution that i could get to work with android (v8 i think?) as android only supports slaac. Although i verified the result on windows 10 as well (windows 10 testing is a bit of a pita though, because of the above mentioned bug and you first have to disable ipv4 on the system before it will list the entry)

I put the prefference in output of radvdump is (restarted Service with sudo systemctl restart radvd.service, no error):

Seems that the Router sends with high Preference, right? And my Pi still with medium?

(xxxx just to hide actual ipv6, no xxxx was in the original output)

radvd configuration generated by radvdump 1.9.1

based on Router Advertisement from fe80::1 (Router IPv6, this is the DNS that e.g. I can see is automatically configured in Windows 10)

received by interface eth0

interface eth0
{
AdvSendAdvert on;

Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump

AdvManagedFlag off;
AdvOtherConfigFlag on;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 255;
AdvDefaultLifetime 180;
AdvHomeAgentFlag off;
AdvDefaultPreference high;
AdvLinkMTU 1492;
AdvSourceLLAddress on;

prefix 2003:45:xxxx:xxxx:/64 (prefix of Router sent?)
{
AdvValidLifetime 604800;
AdvPreferredLifetime 86400;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
}; # End of prefix definition

prefix fd55:6973:xxxx:1::/64 (?)
{
AdvValidLifetime 1814400;
AdvPreferredLifetime 604800;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
}; # End of prefix definition

}; # End of interface definition

radvd configuration generated by radvdump 1.9.1

based on Router Advertisement from fe80::1bf2:525a:xxxx:xxxx (ipv6 eth0 on Pi)

received by interface eth0

interface eth0
{
AdvSendAdvert on;

Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump

AdvManagedFlag off;
AdvOtherConfigFlag off;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 30;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvSourceLLAddress on;

RDNSS fd55:6973:4046:1:e0cd:55e1:xxxx:xxxx (eth0 pi ULA used for pihole)
{
AdvRDNSSLifetime 20;
}; # End of RDNSS definition

}; # End of interface definition

My config file now looks like this:

interface eth0
{
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
RDNSS fd55:6973:4046:1:e0cd:55e1:xxxx:xxxx
{
AdvRDNSSLifetime 20;
AdvRDNSSPreference 15;
};
};

Ok, it all seems to be in order. I'm at a loss. the only thing i can think of is trying a globally routable adres for the pihole and advertise that instead of the non-routable fd55 adres.

The other two are expected, it is your global routable prefix and the ULA prefix, both from the router i'm guessing

On the Router it ist: AdvDefaultPreference high;
And on the Pi: AdvDefaultPreference medium;

Shouldn't AdvRDNSSPreference 15; make that to high?

Thanks for the great help so far :slight_smile:

you can easily set it to high in the config of course. although according the manual the rdnss setting should be specific. of course i'm not a major expert in radvd, i just use it in my slaac set-up :slight_smile:

Thanks so far,

I believe AdvRDNSSPreference 15 is ignored in the version 1.7+, I have 1.9.1 (see Router Advertisement (radvd) configuration [Old OpenWrt Wiki])

I put AdvDefaultPreference high; in my config so it looks like this now:

interface eth0
{
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvDefaultPreference high;
RDNSS fd55:6973:4046:1:e0cd:55e1:xxxx:xxxx
{
AdvRDNSSLifetime 20;
AdvRDNSSPreference 15;
};
};

On Android I don´t get any difference, but now on iOS (iPhone, iPod touch or iPad) I get the DNS of the Pi in Ipv6 and Ipv4 so this already helped.

Windows 10 still gets the DNS of the Router (probably through DHCPv6 that I can´t turn off on the router and I can´t configure which DNS Ipv6 the Router sends). But WIndows 10 gets now 2 IPV6 Gateways, the Router and the pi, but ipv6 still works on Windows 10.

Thank you for your help :+1:t3:

Don't get me started on win10 :wink:

you can try to add:

AdvManagedFlag 1;
AdvOtherConfigFlag 1;

To see if that gets more nodes to pick it up, although it had some unpredictable results for me.

version 1.9.1 is 5 years old and misses some RNDSS code changes. are you sure you are on 1.9.1? even current raspbian (raspbian stretch) is on 2.15 for me (and that is well over a year old). And they just updated to the 4.14 kernel branch, which is very nice for some other stuff i'm doing

I have rasbian Jessie
Problem accured: iOS devices tend to choose the pi also as the router. Tried advdefaultlifetime 0;

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.