![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How can the guest know the outside IP it is using? 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? -- Bo Berglund (Sweden) |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How can the guest know the outside IP it is using? ---> Quote: > 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? > script and extract the returned IP address from the page. I have not tried this, but it sound feasible. GP |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How can the guest know the outside IP it is using? "Bo Berglund" <boberglund@xxxxxx> wrote in message news:sktik4pq4hojvlu9lpk3hs44rbhlg649li@xxxxxx Quote: > 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). -- Mark Rae ASP.NET MVP http://www.markrae.net |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How can the guest know the outside IP it is using? ---> Quote: > "Bo Berglund" <boberglund@xxxxxx> wrote in message > news:sktik4pq4hojvlu9lpk3hs44rbhlg649li@xxxxxx > Quote: >> 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/ > > "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 |
My System Specs![]() |
| | #5 (permalink) |
| | Re: How can the guest know the outside IP it is using? On Wed, 17 Dec 2008 17:09:57 -0500, Grand_Poobah <whatever@xxxxxx> wrote: Quote: >---> Quote: >> 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 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) |
My System Specs![]() |
| | #6 (permalink) |
| | Re: How can the guest know the outside IP it is using? On Wed, 17 Dec 2008 22:18:54 -0000, "Mark Rae [MVP]" <mark@xxxxxx> wrote: Quote: >"Bo Berglund" <boberglund@xxxxxx> wrote in message >news:sktik4pq4hojvlu9lpk3hs44rbhlg649li@xxxxxx > Quote: >> 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/ 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) |
My System Specs![]() |
| | #7 (permalink) |
| | Re: How can the guest know the outside IP it is using? ---> Quote: > On Wed, 17 Dec 2008 17:09:57 -0500, Grand_Poobah > <whatever@xxxxxx> wrote: > Quote: >> ---> Quote: >>> 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? >>> >> 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? > 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 |
My System Specs![]() |
| | #8 (permalink) |
| | Re: How can the guest know the outside IP it is using? On Wed, 17 Dec 2008 23:30:44 +0100, Bo Berglund <boberglund@xxxxxx> wrote: Quote: >On Wed, 17 Dec 2008 22:18:54 -0000, "Mark Rae [MVP]" ><mark@xxxxxx> wrote: > Quote: >>"Bo Berglund" <boberglund@xxxxxx> wrote in message >>news:sktik4pq4hojvlu9lpk3hs44rbhlg649li@xxxxxx >> Quote: >>> 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. :-) 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) |
My System Specs![]() |
| | #9 (permalink) |
| | Re: How can the guest know the outside IP it is using? ---> Quote: > On Wed, 17 Dec 2008 23:30:44 +0100, Bo Berglund <boberglund@xxxxxx> > wrote: > Quote: >> On Wed, 17 Dec 2008 22:18:54 -0000, "Mark Rae [MVP]" >> <mark@xxxxxx> wrote: >> Quote: >>> "Bo Berglund" <boberglund@xxxxxx> wrote in message >>> news:sktik4pq4hojvlu9lpk3hs44rbhlg649li@xxxxxx >>> >>>> 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/ >> 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! > happy. ![]() GP |
My System Specs![]() |
| | #10 (permalink) |
| | Re: How can the guest know the outside IP it is using? "Bo Berglund" <boberglund@xxxxxx> wrote in message news:0bvik4hian7mml0dn1eisnuspi48f5aija@xxxxxx Quote: Quote: Quote: >>> 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. :-) -- Mark Rae ASP.NET MVP http://www.markrae.net |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Host: Vista, Guest: XP - using guest for MP3 player? | Virtual PC | |||
| can I autorun a programme in a guest when starting guest? | Virtual PC | |||
| Networking Guest to Host and Host to Guest | Virtual PC | |||
| guest log in | Vista account administration | |||
| guest log on????? | Vista account administration | |||