Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need to find my public ip address using a script. -- Solved
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2151

PostPosted: Mon Sep 11, 2017 6:23 pm    Post subject: Need to find my public ip address using a script. -- Solved Reply with quote

Hi,

I need to find my public ip address using a script that will go into cron.

I need to update my ddns entry, but the tools provided by the dns provider to update don't support my router. So I need to do the equivalent of googling "what's my ip address" and get an ipv4 address back out.

For the record a wget on google and a few other search engines gets "access denied." I found a site that does let wget grab the address but I'm not sure how long it will last before they block it too.

So if there's some standard way of finding out, I'd love to hear about it.


Last edited by 1clue on Mon Sep 11, 2017 6:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 403

PostPosted: Mon Sep 11, 2017 6:32 pm    Post subject: Reply with quote

Code:
wget -q -O - http://ipecho.net/plain

_________________
My phrenologist says I'm stupid.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2151

PostPosted: Mon Sep 11, 2017 6:54 pm    Post subject: Reply with quote

Fantastic! Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum