|
-
Dec 30th, 2003, 03:10 PM
#1
Thread Starter
Frenzied Member
Enable or Disable an IP Address
Ok, I have a Windows Server that I have DHCP setup on... I want to write piece of software that will allow me to enable or disable traffic on a specific ip address...
Is this possible using Visual Basic or Windows API???
Thanks for the input,
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Dec 31st, 2003, 11:34 AM
#2
Addicted Member
If you are looking for something in ASP, then you can use
Request.ServerVariables("REMOTE_ADDR")
This will tell you the IP address of the computer requesting your app.
-
Dec 31st, 2003, 02:56 PM
#3
Thread Starter
Frenzied Member
Well...
Unfortunately, I'm not using ASP, and the computer will not be accessing my app. What I need is basically a way to see all ip traffic moving through the server and stop throughput on any one IP address... An IP blocker if you will...
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Dec 31st, 2003, 04:00 PM
#4
Re: Well...
Originally posted by squirrelly1
Unfortunately, I'm not using ASP, and the computer will not be accessing my app. What I need is basically a way to see all ip traffic moving through the server and stop throughput on any one IP address... An IP blocker if you will...
I am currently planning to write something similar to your one. There are two ways of doing it. First you loop through all port(port scanner) and find out the state of each ports. This way is very slow and takes a long time to loop trhough all the ports. It is hard to show a realtime picture of the connection.
The second option is using an un documented API availabe which gives you the same result as the DOS command "NetStat". I am currently working on it and will give you more details on couple of days. If you are in a hurry then PM me if want to contact me through email.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Jan 1st, 2004, 12:11 PM
#5
Thread Starter
Frenzied Member
Danial,
It is not vital that I have this information immediately. I have not started this program yet, nor have I told my customer that I would be able to do it for them. I am just inquiring as to how it could be done. I do however appreciate any information that you could possibly give me regarding this issue.
To anyone else,
If you know anything of this or any sites where I might be able to find VB Networking help or tutorials, please post them.
Thank you all for your help,
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Jan 1st, 2004, 12:20 PM
#6
Look for AllocateAndGetTcpExTableFromStack, GetTcpTable, GetUDPTable API, you should be able to find some example. Those are the two main API i am planning to use. I am currently working on other part of my utility, and soon will ad the functionality described in my earlier post.
Hope this helps.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Jan 1st, 2004, 12:32 PM
#7
Thread Starter
Frenzied Member
I see that each of these will tell me which IP have access to the system, but will they let me close a port, or access to the system by a specific IP??? This is what I am needing to do.
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Jan 1st, 2004, 12:34 PM
#8
Thread Starter
Frenzied Member
Forget that previous post I just found a site that looks pretty promising... 
Thank you very much for your assistance Danial, hopefully one day I can return the favor.
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Jan 1st, 2004, 12:39 PM
#9
Originally posted by squirrelly1
but will they let me close a port, or access to the system by a specific IP??? This is what I am needing to do.
You could use the API SetTcpEntry to terminate connection.
Forget that previous post I just found a site that looks pretty promising...
Thank you very much for your assistance Danial, hopefully one day I can return the favor
Mind sharing the website? It might help me and others reading this thread too .
Glad i could help you.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Jan 1st, 2004, 12:44 PM
#10
Thread Starter
Frenzied Member
Here it is guys and gals... It's some really good sample code I found...
http://www.planet-source-code.com/UR...10/anyname.htm
Thanx again... I'll check out the other API You mentioned
squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|