IPv6 DNS hosts file and Server addressing
G'day all,
An issue was found with people who were running dual stack IP configurations where if they only wanted to use IPv6 for their securenode upon connecting to the securenode tracker server their IPv4 address was being displayed.
This is because of the way that the OS does DNS name resolutions. To resolve this issue cronic has created a helper script that connects to the securenode tracker servers, obtains their IPv6 addresses, and appends the /etc/hosts
file.
This script is available here
Installation of the script
The location of the script can be anywhere as we will be creating a cron.hourly link to it, I have chosen /home/username/zencash
just to keep things neat and tidy.
cd /home/username/zencash
Start your favourite editor, I have chosen nano.
nano secnode_force_ipv6.sh
Once you have copied in the code to the new script, save the file.
Now change it into an executable file:
chmod +x secnode_force_ipv6.sh
Then we create the cron.hourly link using the following command:
sudo ln -s path/to/script /etc/cron.hourly/secnode_force_ipv6
using my example above I would enter:
sudo ln -s /home/username/zencash/secnode_force_ipv6.sh /etc/cron.hourly/secnode_force_ipv6
By doing this, the cron job will run hourly to check for the IPv6 server addresses and make changes to the /etc/hosts
file if there are any changes.
I hope this guide helps you out and if you have any questions shoot them through below or in the Slack/Discord securenodes channel.
Have a great day