Sent: 12/17/2008
From: Grand_Poobah <(email address - cut out)>
Message:--->
Can you get to the Web? If so, try going to "www.whatismyip.com" with a
script and extract the returned IP address from the page. I have not
tried this, but it sound feasible.
GP
Show quoted text
> Say that I have a Windows guest (XP or similar) set to obtain its IP
> address automatically.
> On the guest settings I have selected the host NIC.
> The host NIC is connected to a router, which in turn is connected to
> an ADSL modem. The router provides private IP addresses to all
> connected internal NIC:s in the 192.168.x.x range.
>
> The router holds a fixed IP address to the Internet or is getting its
> address via DHCP from the ISP.
>
> Now I would like to know how the guest can find out the IP address the
> ISP has assigned to the router's external interface (fixed or by
> DHCP).
>
> Is there a simple command that can get this info into a program
> running on the guest?
>
Sent: 12/17/2008
From: Grand_Poobah <(email address - cut out)>
Message:--->
True. But the rest of the post said:
"Is there a simple command that can get this info into a program
running on the guest?"
That's a bit more complicated I'd think.
GP
Show quoted text
> "Bo Berglund" <(email address - cut out)> wrote in message
> news:(email address - cut out)...
>
>> Now I would like to know how the guest can find out the IP address the
>> ISP has assigned to the router's external interface (fixed or by DHCP).
>
> http://www.whatismyip.org/
>
>
Sent: 12/17/2008
From: Grand_Poobah <(email address - cut out)>
Message:--->
I, personally, haven't done it, but there are "stripper" programs that
can run under scripting control that will 'strip' all the text off a web
page. You run this and look for the page:
www.whatismyip.com/automation/n09230945.asp
This page is what is showing your IP address. whatismyip.com tells this
to you if you look in your browser and "Show page source". Look for the
instructions for using this page.
GP
Show quoted text
> On Wed, 17 Dec 2008 17:09:57 -0500, Grand_Poobah
> <(email address - cut out)> wrote:
>
>> --->
>>> Say that I have a Windows guest (XP or similar) set to obtain its IP
>>> address automatically.
>>> On the guest settings I have selected the host NIC.
>>> The host NIC is connected to a router, which in turn is connected to
>>> an ADSL modem. The router provides private IP addresses to all
>>> connected internal NIC:s in the 192.168.x.x range.
>>>
>>> The router holds a fixed IP address to the Internet or is getting its
>>> address via DHCP from the ISP.
>>>
>>> Now I would like to know how the guest can find out the IP address the
>>> ISP has assigned to the router's external interface (fixed or by
>>> DHCP).
>>>
>>> Is there a simple command that can get this info into a program
>>> running on the guest?
>>>
>> Can you get to the Web? If so, try going to "www.whatismyip.com" with a
>> script and extract the returned IP address from the page. I have not
>> tried this, but it sound feasible.
>>
>> GP
>
> Thanks, this works in a visual sort of way....
>
> But I did want some trick to give me this info programmatically
> because I need my virtual W2003 server to discover the IP regularly.
>
> I run this guest in Virtual Server 24/7 to act as my VPN gateway from
> outside into my internal network.
> For a couple of years I have used an ISP who has given me a fixed
> address, but now I have to switch to a different provider, which only
> supplies DHCP addresses.
> So I need some way to know what is the current external address my
> router uses since that is the address I need to point my VPN
> connection at.
> The plan was to have the W2003 server regularly check the external
> address and then publish it in a webpage on a private homepage at the
> ISP where I can look it up if the connection fails.
>
> Maybe there is a better solution?
>
Sent: 12/17/2008
From: Grand_Poobah <(email address - cut out)>
Message:--->
No problem. Now, if I can get that stupid W2K to install we'd both be
happy. :)
GP
Show quoted text
> On Wed, 17 Dec 2008 23:30:44 +0100, Bo Berglund <(email address - cut out)>
> wrote:
>
>> On Wed, 17 Dec 2008 22:18:54 -0000, "Mark Rae [MVP]"
>> <(email address - cut out)> wrote:
>>
>>> "Bo Berglund" <(email address - cut out)> wrote in message
>>> news:(email address - cut out)...
>>>
>>>> Now I would like to know how the guest can find out the IP address the
>>>> ISP has assigned to the router's external interface (fixed or by DHCP).
>>> http://www.whatismyip.org/
>> Or better yet:
>> http://www.whatismyip.com/automation/n09230945.asp
>>
>> This gives me just the IP address as the return page, should be easier
>> to automate. :-)
>
> Done!
> It took a Delphi console application totalling 33 lines of code
> including whitespace and fixed stuff to retrieve the IP address from
> http://www.whatismyip.com/automation/n09230945.asp and put it into a
> string variable to print on the console.
>
> Now I just have to upload the result into my website using FTP. :-)
> Thanks for the link that made it all possible!
>
Sent: 12/17/2008
From: "Mark Rae [MVP]" <(email address - cut out)>
Message:"Bo Berglund" <(email address - cut out)> wrote in message
news:(email address - cut out)...
http://www.whatismyip.org/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Show quoted text
> Now I would like to know how the guest can find out the IP address the
> ISP has assigned to the router's external interface (fixed or by DHCP).
Sent: 12/17/2008
From: "Mark Rae [MVP]" <(email address - cut out)>
Message:"Bo Berglund" <(email address - cut out)> wrote in message
news:(email address - cut out)...
Do a View Source on both pages - what's the difference...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Show quoted text
>>> Now I would like to know how the guest can find out the IP address the
>>> ISP has assigned to the router's external interface (fixed or by DHCP).
>>
>>http://www.whatismyip.org/
>
> Or better yet:
> http://www.whatismyip.com/automation/n09230945.asp
>
> This gives me just the IP address as the return page, should be easier
> to automate. :-)
Sent: 12/17/2008
From: Bo Berglund <(email address - cut out)>
Message:On Wed, 17 Dec 2008 17:09:57 -0500, Grand_Poobah
<(email address - cut out)> wrote:
Thanks, this works in a visual sort of way....
But I did want some trick to give me this info programmatically
because I need my virtual W2003 server to discover the IP regularly.
I run this guest in Virtual Server 24/7 to act as my VPN gateway from
outside into my internal network.
For a couple of years I have used an ISP who has given me a fixed
address, but now I have to switch to a different provider, which only
supplies DHCP addresses.
So I need some way to know what is the current external address my
router uses since that is the address I need to point my VPN
connection at.
The plan was to have the W2003 server regularly check the external
address and then publish it in a webpage on a private homepage at the
ISP where I can look it up if the connection fails.
Maybe there is a better solution?
--
Bo Berglund (Sweden)
Show quoted text
>--->
>> Say that I have a Windows guest (XP or similar) set to obtain its IP
>> address automatically.
>> On the guest settings I have selected the host NIC.
>> The host NIC is connected to a router, which in turn is connected to
>> an ADSL modem. The router provides private IP addresses to all
>> connected internal NIC:s in the 192.168.x.x range.
>>
>> The router holds a fixed IP address to the Internet or is getting its
>> address via DHCP from the ISP.
>>
>> Now I would like to know how the guest can find out the IP address the
>> ISP has assigned to the router's external interface (fixed or by
>> DHCP).
>>
>> Is there a simple command that can get this info into a program
>> running on the guest?
>>
>
>Can you get to the Web? If so, try going to "www.whatismyip.com" with a
>script and extract the returned IP address from the page. I have not
>tried this, but it sound feasible.
>
>GP
Sent: 12/17/2008
From: Bo Berglund <(email address - cut out)>
Message:On Wed, 17 Dec 2008 22:18:54 -0000, "Mark Rae [MVP]"
<(email address - cut out)> wrote:
Or better yet:
http://www.whatismyip.com/automation/n09230945.asp
This gives me just the IP address as the return page, should be easier
to automate. :-)
--
Bo Berglund (Sweden)
Show quoted text
>"Bo Berglund" <(email address - cut out)> wrote in message
>news:(email address - cut out)...
>
>> Now I would like to know how the guest can find out the IP address the
>> ISP has assigned to the router's external interface (fixed or by DHCP).
>
>http://www.whatismyip.org/
Sent: 12/18/2008
From: Bo Berglund <(email address - cut out)>
Message:On Wed, 17 Dec 2008 23:30:44 +0100, Bo Berglund <(email address - cut out)>
wrote:
Done!
It took a Delphi console application totalling 33 lines of code
including whitespace and fixed stuff to retrieve the IP address from
http://www.whatismyip.com/automation/n09230945.asp and put it into a
string variable to print on the console.
Now I just have to upload the result into my website using FTP. :-)
Thanks for the link that made it all possible!
--
Bo Berglund (Sweden)
Show quoted text
>On Wed, 17 Dec 2008 22:18:54 -0000, "Mark Rae [MVP]"
><(email address - cut out)> wrote:
>
>>"Bo Berglund" <(email address - cut out)> wrote in message
>>news:(email address - cut out)...
>>
>>> Now I would like to know how the guest can find out the IP address the
>>> ISP has assigned to the router's external interface (fixed or by DHCP).
>>
>>http://www.whatismyip.org/
>
>Or better yet:
>http://www.whatismyip.com/automation/n09230945.asp
>
>This gives me just the IP address as the return page, should be easier
>to automate. :-)
Sent: 12/18/2008
From: Dave U. Random <(email address - cut out)>
Message:In article <(email address - cut out)>
Bo Berglund <(email address - cut out)> wrote:
Why not just use one of the free dynamic IP sites to give your IP
a domain name, such as http://www.dyndns.com/about/home_solutions.html?
Show quoted text
>
> On Wed, 17 Dec 2008 17:09:57 -0500, Grand_Poobah
> <(email address - cut out)> wrote:
>
> >--->
> >> Say that I have a Windows guest (XP or similar) set to obtain its IP
> >> address automatically.
> >> On the guest settings I have selected the host NIC.
> >> The host NIC is connected to a router, which in turn is connected to
> >> an ADSL modem. The router provides private IP addresses to all
> >> connected internal NIC:s in the 192.168.x.x range.
> >>
> >> The router holds a fixed IP address to the Internet or is getting its
> >> address via DHCP from the ISP.
> >>
> >> Now I would like to know how the guest can find out the IP address the
> >> ISP has assigned to the router's external interface (fixed or by
> >> DHCP).
> >>
> >> Is there a simple command that can get this info into a program
> >> running on the guest?
> >>
> >
> >Can you get to the Web? If so, try going to "www.whatismyip.com" with a
> >script and extract the returned IP address from the page. I have not
> >tried this, but it sound feasible.
> >
> >GP
>
> Thanks, this works in a visual sort of way....
>
> But I did want some trick to give me this info programmatically
> because I need my virtual W2003 server to discover the IP regularly.
>
> I run this guest in Virtual Server 24/7 to act as my VPN gateway from
> outside into my internal network.
> For a couple of years I have used an ISP who has given me a fixed
> address, but now I have to switch to a different provider, which only
> supplies DHCP addresses.
> So I need some way to know what is the current external address my
> router uses since that is the address I need to point my VPN
> connection at.
> The plan was to have the W2003 server regularly check the external
> address and then publish it in a webpage on a private homepage at the
> ISP where I can look it up if the connection fails.
>
> Maybe there is a better solution?
>
Sent: 12/18/2008
From: d d <(email address - cut out)>
Message:Bo Berglund wrote:
Have you looked into using a dyndns service? It seems like you're doing
all this so that you can know (externally) what IP address a (virtual)
machine has been given by it's ISP. The router will probably have a tab
in it's configuration menus for hitting a dyndns server. This is a
service that each time your router negotiates a new lease, it will ping
the dyndns service and the IP address will be recorded. The upshot of
this is that you get a URL that you can use to access the machine.
Something like http://somedyndnsserviceorother.org/myaccountid123 and
that resolves to your IP.
Show quoted text
> On Wed, 17 Dec 2008 23:30:44 +0100, Bo Berglund <(email address - cut out)>
> wrote:
>>>> Now I would like to know how the guest can find out the IP address the
>>>> ISP has assigned to the router's external interface (fixed or by DHCP).
>>> http://www.whatismyip.org/
>> Or better yet:
>> http://www.whatismyip.com/automation/n09230945.asp
>>
>> This gives me just the IP address as the return page, should be easier
>> to automate. :-)
>
> Done!
> It took a Delphi console application totalling 33 lines of code
> including whitespace and fixed stuff to retrieve the IP address from
> http://www.whatismyip.com/automation/n09230945.asp and put it into a
> string variable to print on the console.
>
> Now I just have to upload the result into my website using FTP. :-)
> Thanks for the link that made it all possible!
Sent: 12/18/2008
From: "Mark Rae [MVP]" <(email address - cut out)>
Message:"Bo Berglund" <(email address - cut out)> wrote in message
news:(email address - cut out)...
Interesting - I don't see that at all... When I do a View Source on
http://www.whatismyip.org/, it shows my IP address and nothing else...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Show quoted text
>>Do a View Source on both pages - what's the difference...?
>
> I have:
> The original page is 119 lines long with a lot of HTML code to parse.
Sent: 12/18/2008
From: Bo Berglund <(email address - cut out)>
Message:On Wed, 17 Dec 2008 23:19:08 -0000, "Mark Rae [MVP]"
<(email address - cut out)> wrote:
I have:
The original page is 119 lines long with a lot of HTML code to parse.
The Automation page is a single line with the IP address and *nothing*
else not even a single HTML tag.
I think the automation page is a *lot* easier to deal with....
--
Bo Berglund (Sweden)
Show quoted text
>"Bo Berglund" <(email address - cut out)> wrote in message
>news:(email address - cut out)...
>
>>>> Now I would like to know how the guest can find out the IP address the
>>>> ISP has assigned to the router's external interface (fixed or by DHCP).
>>>
>>>http://www.whatismyip.org/
>>
>> Or better yet:
>> http://www.whatismyip.com/automation/n09230945.asp
>>
>> This gives me just the IP address as the return page, should be easier
>> to automate. :-)
>
>Do a View Source on both pages - what's the difference...?
Sent: 12/18/2008
From: Borked Pseudo Mailed <(email address - cut out)>
Message:In article <(email address - cut out)>
Bo Berglund <(email address - cut out)> wrote:
Duh! Two different domains. One in CA the other in Canada.
Show quoted text
>
> On Thu, 18 Dec 2008 07:20:22 -0000, "Mark Rae [MVP]"
> <(email address - cut out)> wrote:
>
> >"Bo Berglund" <(email address - cut out)> wrote in message
> >news:(email address - cut out)...
> >
> >>>Do a View Source on both pages - what's the difference...?
> >>
> >> I have:
> >> The original page is 119 lines long with a lot of HTML code to parse.
> >
> >Interesting - I don't see that at all... When I do a View Source on
> >http://www.whatismyip.org/, it shows my IP address and nothing else...
>
> This is really strange, I used a link to http://www.whatismyip.com
> supplied by "Grand_Poohbah" and got to a page with a lot of text like
> I said.
> But if the URL in the browser is changed to
> http://www.whatismyip.org/, which is the one you posted, one actually
> winds up in the single line page.
> And this is exactly like the page you see on this URL:
> http://www.whatismyip.com/automation/n09230945.asp, which is reachable
> via two clicks on the com page.
>
> Seems like ther is a difference between the .org and .com domains
> here....
> Strange.
>
Sent: 12/18/2008
From: Bo Berglund <(email address - cut out)>
Message:On Thu, 18 Dec 2008 07:20:22 -0000, "Mark Rae [MVP]"
<(email address - cut out)> wrote:
This is really strange, I used a link to http://www.whatismyip.com
supplied by "Grand_Poohbah" and got to a page with a lot of text like
I said.
But if the URL in the browser is changed to
http://www.whatismyip.org/, which is the one you posted, one actually
winds up in the single line page.
And this is exactly like the page you see on this URL:
http://www.whatismyip.com/automation/n09230945.asp, which is reachable
via two clicks on the com page.
Seems like ther is a difference between the .org and .com domains
here....
Strange.
--
Bo Berglund (Sweden)
Show quoted text
>"Bo Berglund" <(email address - cut out)> wrote in message
>news:(email address - cut out)...
>
>>>Do a View Source on both pages - what's the difference...?
>>
>> I have:
>> The original page is 119 lines long with a lot of HTML code to parse.
>
>Interesting - I don't see that at all... When I do a View Source on
>http://www.whatismyip.org/, it shows my IP address and nothing else...