IP capture
I have a situation where I have a vpn setup on a win2k server, the server unfortunately is on Dial-up and has a dhcp ip address. I need to administer it via terminal services, it is up most of the time, however as I said it is dhcp.
I have a situation where I have a vpn setup on a win2k server, the server unfortunately is on Dial-up and has a dhcp ip address. I need to administer it via terminal services, it is up most of the time, however as I said it is dhcp. So I need a way to get the IP, does anyone know of a tool I can use for this, or maybe some vb/c++/c# source code for this? as i have VS.NET. If it only emails me its address whenever it logs on, would be fine, or if its a two part program, is fine .. heh no I dont want to use bo or anything like that, well any help would be appreciated .. thanks
-neural
-neural
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
The code to get the IP is pretty simple, however here is another solution. Register for free a domain name for the server. I use dns2go which gave me a domain and then has a client that automatically points the domain to that server. There are similar services.
If you really want to use VB, don't be elegant with it. to get the job done use the shell command to pipe ipconfig to a text file. In vbs it is shell.exec
Then you need to mail it. I'm not sure how .net does mapi but if you have exchange, you can "pre create" a text file with the headers in it and if copied into the proper directory will cause it to be mailed. The directory is \exchsrvr\IMCdata\Pickup , and the format is:
From: sender@ServerDomain.com
To: recipient@YourMailDomain.com
Subject: My ip
insert message body (ipconfig data) here. Make sure there is a blank line between the subject and body or you will spend an hour like I did trying to figure out why it does not work.
If you really want to use VB, don't be elegant with it. to get the job done use the shell command to pipe ipconfig to a text file. In vbs it is shell.exec
Then you need to mail it. I'm not sure how .net does mapi but if you have exchange, you can "pre create" a text file with the headers in it and if copied into the proper directory will cause it to be mailed. The directory is \exchsrvr\IMCdata\Pickup , and the format is:
From: sender@ServerDomain.com
To: recipient@YourMailDomain.com
Subject: My ip
insert message body (ipconfig data) here. Make sure there is a blank line between the subject and body or you will spend an hour like I did trying to figure out why it does not work.
then what? schedule the script to run if the ip has changed? or make it auto sen on connect?
also check out
http://sourceforge.net/projects/ddu
or for a totally client side solution: http://www.webattack.com/get/redirectip.shtml
also check out
http://sourceforge.net/projects/ddu
or for a totally client side solution: http://www.webattack.com/get/redirectip.shtml