CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13
  1. #1
    Join Date
    Jul 2004
    Posts
    5

    Block internet access to a specific program?

    New to the forums and website so Hi everyone

    I need some help to block all internet traffic for 1 process. Maybe the process list can be in a drop list and i can select it, or i can just type in the process.exe for it to work.

    This needs to have a hotkey to disable and enable whilst i am in the application that I want to block. Hope this makes sense.

    Thanks all.

  2. #2
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104
    it would be easier to install a firewall and set a rule up for this, as preventing net access on a per application basis would normally require some low level hooks into the networking stacks.. concepts beyond a newcomer, sorry
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  3. #3
    Join Date
    Jul 2004
    Posts
    5
    Sygate firewall has this feature... but it doesnt have a hotkey for it

    Could anyone maybe right the program for me? I know it's asking alot but i would really really appreciate it.

  4. #4
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104
    hotkey for what?
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  5. #5
    Join Date
    Jul 2004
    Posts
    5
    Hotkey to Disable the internet access to the specified program.(like ctrl + num 2)

    And a Hotkey to Enable it again (ctrl + num 3)

    If someone could make this I would so greatful. I would pay for it but my paypal has no money lol but if i do put some in there i would donate some to the maker

  6. #6
    Join Date
    Jul 2004
    Posts
    5
    Can noone help me?

  7. #7
    Join Date
    Dec 2002
    Location
    NC
    Posts
    125
    This may or may not help you out but it could push you in the right direction. I'm not sure how firewalls work exacly but here are my thoughts.

    1. There are API that will give you all running processes, fairly easy just do a search here and Im sure you'll find it. From there you could by name stop that service from any TCP or UDP activity.

    2. I have played around with the find windo API. The way it works is you have to know the actual window name (accomplished by using spy ++) and if the program is launched and visible you can try the same thing as above.

    Stopping the service from internet activity will be the tricky part (at least for me).
    You may also want to check into some type of packet inspecting also.

    Good luck
    R.L.T.W. A+, NET+, CCNA

    doin' my best

  8. #8
    Join Date
    Jul 2004
    Posts
    5
    Thanks for the reply. I have worked out the process part of it, but it's the stopping of the network traffic to this program which is the difficult part.

  9. #9
    Join Date
    Dec 2008
    Posts
    4

    Unhappy Re: Block internet access to a specific program?

    yes i know this is an old post but i have the same problem and still cannot found the solution. can any one help please.

  10. #10
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Block internet access to a specific program?

    Still works to stop all traffic.

    Code:
    shell "ipconfig /release"
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  11. #11
    Join Date
    Dec 2008
    Posts
    4

    Unhappy Re: Block internet access to a specific program?

    Quote Originally Posted by dglienna View Post
    Still works to stop all traffic.

    Code:
    shell "ipconfig /release"
    Thanks for quick replay, but all i want is to block a specific program only to access internet.for example blocking blabla.exe from accessing internet but not blocking all traffic. hope someone can help me.

  12. #12
    Join Date
    Dec 2008
    Posts
    4

    Re: Block internet access to a specific program?

    no one can help?

  13. #13
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Block internet access to a specific program?

    Nope. You could try to program a firewall application, or use your own program. We can't help disable things on the Internet, for any reason.

    Windows can block access to any programs for a particular user. Wouldn't that do?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured