Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 HALP! Questions on Windows and Windows Server
 Scripting
 command line util to show public IP
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mitachu
Honorable But Hopeless Addict

United Kingdom
1947 Posts
Status: offline

Posted - 06/28/2011 :  2:27:39 PM  Show Profile  Click to see mitachu's MSN Messenger address  Reply with Quote
Does anyone know of some commandline util to display the public IP you're coming from, even behind NAT?
I know I could wget something like www.whatismyip.com or similar but I'd prefer to be a bit cleaner.

Tim

cj_berlin
Honorable But Hopeless Addict

Germany
3964 Posts
Status: offline

Posted - 06/28/2011 :  2:46:33 PM  Show Profile  Visit cj_berlin's Homepage  Look at the Skype address for cj_berlin  Reply with Quote
Well, Tim, if it's NOT behind NAT, your util would be ipconfig .

From behind NAT... you could see if you can find some open source DynDNS updater and hack that. Or you put a PHP script on a webspace that only echoes back the $_SERVER['HTTP_REMOTE_ADDR'] value and wget that...

Evgenij Smirnov
Go to Top of Page

cj_berlin
Honorable But Hopeless Addict

Germany
3964 Posts
Status: offline

Posted - 06/28/2011 :  2:50:57 PM  Show Profile  Visit cj_berlin's Homepage  Look at the Skype address for cj_berlin  Reply with Quote
quote:
Originally posted by mitachu


I know I could wget something like www.whatismyip.com



I wonder if you can wget http://www.moanmyip.com/

Evgenij Smirnov
Go to Top of Page

Nobody
Here To Stay

USA
184 Posts
Status: offline

Posted - 06/29/2011 :  11:54:24 AM  Show Profile  Visit Nobody's Homepage  Reply with Quote
What do you need this for? Is this just informational, or are you working on some creative solution to a problem?

aka - Matt
www.SnowTrek.org
Go to Top of Page

Xenophane
Honorable But Hopeless Addict

Denmark
3070 Posts
Status: online

Posted - 06/30/2011 :  04:49:55 AM  Show Profile  Visit Xenophane's Homepage  Send Xenophane an ICQ Message  Reply with Quote
From powershell you could do

Function Get-ExternalIP {
$WC = New-Object System.Net.WebClient
$WC.DownloadString('http://myip.dnsomatic.com/')
}

Microsoft Powershell MVP

SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>

You can read my blog at www.xipher.dk
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.12 seconds. Snitz Forums 2000