* Carlos E. R. <robin.listas@telefonica.net> [03-01-23 16:48]:
On 2023-03-01 14:48, Per Jessen wrote:
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)
Okay :-)
cer@Telcontar:~> wget -4 --timeout=15 -qO - checkip.dns24.ch 79.*.*.*cer@Telcontar:~>
No end line?
MYIP=`wget -4 --timeout=15 -qO - checkip.dns24.ch`;echo $MYIP -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc