![](https://seccdn.libravatar.org/avatar/7131ec792f05bac4a6cb0fb370439522.jpg?s=120&d=mm&r=g)
Carlos E. R. wrote:
On 2023-03-01 13:04, Per Jessen wrote:
I don't really see which problem you are seeking a solution to, though.
Simply, a cron script that logs the current IP and then updates the dynamic DNS entry.
Okay.
The issue - in my view - is that it means more work on your side, but as I said, it depends on which problem you're trying to solve.
Just obtain the IP(s), log it (them), and update dynamic dns server. I have it working for IPv4. I will need to add IPv6 soon.
wget -q -4 -O - http://checkip.dns24.ch/ | <your-script> wget -q -6 -O - http://checkip.dns24.ch/ | <your-script>
I do:
set `wget --inet4-only --timeout=15 -qO - checkip.dyndns.org | \ cut -d":" -f2 | cut -d"<" -f1 | cut -d" " -f2` CURRENTIP="$*"
I would be tempted to shorten that: CURRENTIP=$(wget -4 --timeout=15 -qO - checkip.dyndns.org | \ egrep -o '[0-9.]+')
For IPv6 I expect to do:
wget --inet6-only --timeout=15 -qO - http://checkip.dns24.ch/ | \ cut -d":" -f2 | cut -d"<" -f1 | cut -d" " -f2
checkip.dns24.ch only supplies text, no html. CURRENTIP=$(wget -6 --timeout=15 -qO - checkip.dns24.ch) -- Per Jessen, Zürich (1.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes