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.

Windows Networking 2246 This topic was started by ,


data/avatar/default/avatar06.webp

26 Posts
Location -
Joined 2001-11-23
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

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar39.webp

163 Posts
Location -
Joined 2000-07-30
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.

data/avatar/default/avatar06.webp

26 Posts
Location -
Joined 2001-11-23
OP
hey Ryoko, thanks a lot, this is exactly what I needed. Ya i could probably write that app, but dns2go sounds like the best bet, i should have thought of that=) well thanks a bunch ..
-neural