Why does my IPv6 address disappear after a little while?

Please follow the below template, it will help us to help you!

Expected Behaviour:

Pi-hole retains Global Link IPv6 address in setupVars.conf and in admin settings UI.

Actual Behaviour:

Global Link IPv6 address disappears from setupVars.conf, and therefore does not appear in the UI.

Debug Token:

cpma51tppx

Notes

I've reviewed Use IPv6 ULA addresses for Pi-hole.

At 22:17 Pacific time last night, I manually edited the setupVars.conf file and made sure the current IPv6 was listed in the file. I retrieved the IPv6 address from my RPI with the following:

ifconfig | grep 'Scope:Global' | sed -n '1p' | awk '{print $3}' | awk -F'/' '{print $1}'

I verified the timestamp of the file was:

$ ls -la setupVars.conf
-rw-r--r-- 1 pi pi 734 Mar 25 22:17 setupVars.conf

Upon checking the /etc/pihole directory this morning, the setupVars.conf file had a new timestamp of 23:00 Pacific time:

$ ls -la setupVars.conf
-rw-r--r-- 1 pi pi 697 Mar 25 23:00 setupVars.conf

The file size is slightly smaller, because the IPv6 value is blank again.

I ran my pihole6check script (GitHub - stevejenkins/pihole-utils: Checks the Pi-hole server's current IPv6 address and updates the IPv6 address configured in /etc/pihole/setupVars.conf if necessary.) which puts the IPv6 address back into setupVars.conf. Also, my IPv6 has not changed in the past 24 hours.

What causes the IPv6 value to disappear from setupVars.conf?

Nothing should be writing to this file expect if you manually run some pihole ... script. Do you maybe have a custom cronjob that does something for you?

I also haven't been able to replicate this.

The only cron job I have is an hourly one that runs my pihole6check script to re-insert the IPv6 in the setupVars.conf file! I just disabled it, to verify that it's not causing any problems itself.

1 Like

Ok... looks like the script itself must have somehow been the causing the issue. Probably a permissons issue. However, I'd still like to run the script periodically in case my ISP changes my IPv6 addressing. So once I figure out the permissions issue on the script, I'll run it daily.

1 Like

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