CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    22

    Blocking application port

    Hello,

    can somebody tell me please how to close an existing application port? I wolud like to write a program that blocks the packets of an application, if the application is not digitaly signed.
    I used EnumProcess and now I have a list with the .exe paths and PIDs (process id-s) too.

    Thank you in anticipation for any help.

  2. #2
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    47

    Re: Blocking application port

    Quote Originally Posted by csienke View Post
    Hello,

    can somebody tell me please how to close an existing application port? I wolud like to write a program that blocks the packets of an application, if the application is not digitaly signed.
    I used EnumProcess and now I have a list with the .exe paths and PIDs (process id-s) too.

    Thank you in anticipation for any help.
    Hi there, what you want to do is actually making a "firewall-like" application. I read this article in codeproject (sometimes ago) that you might be interested: http://www.codeproject.com/KB/IP/FwHookDrv.aspx
    Xander Tan

  3. #3
    Join Date
    Feb 2008
    Posts
    22

    Re: Blocking application port

    Hi, thank you for the link. I tried out the source code, but unfortunately it doesn't work with Vista
    I tried it out on one pc with two applications that communicate on a specified port.

    Is there any solution to block packet sending in C++ under Vista?

  4. #4
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    47

    Re: Blocking application port

    Quote Originally Posted by csienke View Post
    Hi, thank you for the link. I tried out the source code, but unfortunately it doesn't work with Vista
    I tried it out on one pc with two applications that communicate on a specified port.

    Is there any solution to block packet sending in C++ under Vista?
    Maybe you could try to use Windows Filtering Platform (WFP), this is the link: http://www.microsoft.com/whdc/device/network/wfp.mspx

    I never tried this before though.
    Xander Tan

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