IPv6 privacy extension failure check and restart network
This script checks that the IPv6 privacy extension are working properly and if there is a problem with getting a new IPv6 address this script restarts the network. I saw once in a while that the IPv6 privacy extension failed to get a new IPv6 address from the router and stopped working. Use this script in a schedule to check for working IPv6 privacy extension.
Update: 2024-12-24. New and improved script to check and restart IPv6 privacy address generation
Save the new file as /etc/cron.hourly/IPv6-privacy-check and chmod 0755 for permission. Change the name of interface ens18 to the name of your server's interface.
Old method that I do not use anymore
Bash script using IPv6 grep
Bash script using IPv6 route command with token. If the IPv6 privacy extension stops working Linux start using the token for outgoing connection, this script checks if a token is being used for outbound connection and if it is then it restarts the network interface.
Let me know if you have any comments or if there is any error in this guide.