Results 1 to 10 of 10

Thread: Enable or Disable an IP Address

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    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?

  2. #2
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    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.
    ~Ryan





    Have I helped you? Please Rate my posts.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    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?

  4. #4
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    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 :

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026
    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?

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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 :

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026
    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?

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026
    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?

  9. #9
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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 :

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026
    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
  •  



Click Here to Expand Forum to Full Width