Problems with changing ipv6 adress and Pi-Hole. Anyone has a hint?

Hello, everyone,

my Pi-Hole 5 is running smoothly and doing its job. Thank you very much for this fantastic work.

My ipv4 in the local network stays the same, because I can fix it in the router.

But if my ipv6 is changed by my provider, it will also change in the local network (no NAT, normal with ipv6). All devices have the known ipv6 as DNS and this changes. That was it with the access :(.

Does anyone have an idea? After all, I cannot enter a host like DynDNS in Windows 10, but only the pure IP :(.

Thanks for help, I hope my request is understandable.

Can you disable IPv6 for your Lan devices?

1 Like

Hi @yubiuser: Yes I could, but I didn´t want to :frowning_face:
Hi @DanSchaper: You are right, I do the changes in the setupVars File, but I didn´t want to do this every two days :(.

Use ULA's instead. That is the message from the link I provided.

@DanSchaper: My Vodafone Station (Germany) dosn´t provide ULA :(. Also no link local adresses I think. I only get:

|IPv6 Adresse|2a02:908:1000:x:x:x:x:x
|IPv6 Präfix Delegation|2a02:908:x:x::/59

Can I do something with the Prefix Delegation?

If the prefix is rotated then no, you can't.

Edit: Link Local is not provided by the ISP. Any device or network can use link local.

@DanSchaper: Sorry, its me again. I found out (ifconfig) that my pi has another v6 IP: fe80::abe1:x:x:x

Is this such a local ip??? Can I use this fe80: adress as DNS in Windows?

Thanks very much!

Edit: It was postet under "lobal".

Yes, fe80 addresses are link local addresses.

But if you are using link local addressing then you really don't need IPv6 at all, just use the internal IPv4 addresses. Pi-hole can give out A records just as easily as AAAA records over any protocol.

@DanSchaper: Thank you realy much for your help and teaching.

Suppose I don't want to disable ipv6 completely, but I can't define v6 DNS in Win10. Won't all ipv6 DNS queries run past the pi-hole?

Edit: If I define the fe80/10 adress in Pi-Hole, it deactivates the v6 settings in Pi-Hole!?

Why do you want IPv6?

@DanSchaper: This is a completely different story. I would like to disable it completely, but the client of my VPN provider switches it back on every time (sets the checkboxes again itself). I'm in discussion with the developers of the VPN about what this is all about. Of course I can use OpenVPN now, but the client is very handy for country selection.

I'm currently testing it to use DNS ::1 and ::2 as ipv6. This causes a fallback to the v4 DNS. Not a nice solution, is it? What do you think?

If you want your IPv6 to change automatically use Stevejenkins pi-hole tools found on github.Read and follow the steps for IPv6. For me it works like a charm,but i removed the command "pihole -g" included in the command since pi-hole does that by itself. I left the crontab running hourly. Add the command as root to the crontab.
This doesn't even have to be implemented into pi-hole since it's easy and accessible to use, but people should be made aware of it.
Edit:Please edit the pihole_ipv6 file and change the "PIHOLE_ADAPTER=eth1 to eth0" or it won't work.

@Spyelite: Thank you very much. This dosnt solve my problem with the DNS ipv6 in Windows10, but its also a very nice script. Ma problem ist, that the script uses the ipv6 without /64, but I think Pi-Hole needs it with /64 at the end?

I tryed $current_ipv6="$current_ipv6/64"; but it didn´t work. Yes, my programing knowledge is worst. :slight_smile: Can you help here? ty

Is pi-hole your dhcp server? if not your windows 10 should get the ipv6 from your router and only request the DNS from time to time or at restart.Please be more detailed about the problem. I'll answer slower since i am busy but i'll do my best.Your ipv6 inside the network should be /64 but there is more related to the provider ipv6. The provider ipv6 can be /128 since your ipv6 will be unique.

@Spyelite: Thanks again. My provider router (cable) is the DHCP and I can´t set the DNS in the router :(. So I had to configure it in every device again. But when the ipv6 changes, the Pi-Hole knows (thanks to your link to the script), but Windows 10 didn´t update.

@DanSchaper: Sorry again. When I use the script we are talking about, is it bad if there isn´t the /24 and /64 behind the IPs in setupVars?

Hehe, ok i understand now. I'll think at a solution for your problem. Basically your manual settings in win10 have to become automatic. If i am not wrong which i may be, Try setting your DNS only on ipv4 and leave the ipv6 as automatic(then restart your network card). I am not sure but Win10 might receive the IPv6 dns from pi-hole.
Also you should ask your provider to allow you to set a custom dns, they might agree on that.
I'll return with an edit with the solution but meanwhile try what i suggested above.
@Nachtwesen Edit: So,i will have to figure out a script in CMD for win10 to request the ipv6 from your hostname(mine is raspberrypi) and then set it as a DNS server.
you can test the command yourself in Win10 CMD which is " ping hostname -6" where hostname is the name of your pi-hole server as stated above mine is "raspberrypi" which makes my command " ping raspberrypi -6" and it returns the ipv6 of the raspberry pi.
It will take some time to do it because i totally suck at cmd and scripting in windows.
If anyone can help speedup the processs that would be great.

@Spyelite: Thanks for your great work. The command ping raspberrypi -6 gives me an ipv6, but its not the same as the one the script (we talked about above) or my router says me. hmmm

Edit: The command ping raspberrypi -6 gives me the correct eth0 ip of the Pi. But the Script from Stevejenkins and my router tells me the ip which is standing unter "lobal" (ifconfig). Any idea?

@Nachtwesen did you edit the PIHOLE_ADAPTER=eth1 to PIHOLE_ADAPTER=eth0 in the pihole_ipv6_check ? also for now remember to comment out "# pihole -g" found in the pihole_ipv6_check for a faster output and not updating the gravity database every time it runs.
Second question: Did you copy the folder pihole-utils into /usr/loca/bin ? cause if you did you have to edit that one with the corect pihole_adapter.Also make sure you call that pihole_ipv6_check.sh in that path because crontab with the settings posted on stevenjenkins crontab settings it's directing towards that folder.

@Spyelite: Yes I do all you sayed (eth0 and # -g). As I edited, my Pi gets both IPs.

ip -6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 THE_IP_ROUTER_AND_SCRIPT_SAYS scope global noprefixroute dynamic
valid_lft 572031sec preferred_lft 572031sec
inet6 THE_IP_PINGraspberrypi-6Win10_SAYS scope global mngtmpaddr noprefi