How to extract ip address from no-ip account webpage in the shell?

0

1

I've set dynamic dns for my home network(which is behind NAT) using www.noip.com. I use ddclient to send updates of my ip, but sometimes it takes a while to update the ip. Anyways it's not the point.

I want to find a way to extract the ip from my no-ip account webpage which is behind the basic authentication using a command line. The webpage where I can see my dyn IP after logging into my account is https://www.noip.com/members/dns/

What I have so far is this (but it doesn't work):

wget -O- --user=mynoipuser --ask-password https://www.noip.com/members/dns/ | grep -oE "\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"

or maybe with wget:

curl --user mynoipuser:password https://www.noip.com/members/dns/ | grep -oE "\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"'

Is it possible at all?

Drew

Posted 2015-09-03T06:17:49.557

Reputation: 1 628

Answers

0

Dynamic DNS services usually have a very low TTL, which make DNS queries being cached for a very short period of time and thus return the current value when queried. Then why not just query the Dynamic DNS host?

dig yourddns.noip.com +short

This will return the A register of your Dynamic DNS account without the need of logging in and doing further complicated steps.

nKn

Posted 2015-09-03T06:17:49.557

Reputation: 4 960

Amazing! Thanx! – Drew – 2015-09-03T06:39:46.510