CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    375

    Disable computer port

    IS there any easy way using C\C++ to diable the computer ports, for example, by disabling port 80 to block internet connection. Thanks!
    Last edited by forester; November 18th, 2008 at 10:50 PM.

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Disable computer port

    Yes, it is called "Installing a FireWall".....

    Seriously, that really is the best way to approach this. Many Firewalls (including the one included with Windows have an API that allow you to configure the behaviour.

    And alternative to "disabling" is to simple create a service wich exclusively attaches to the port, but does not accept or respond. This will "Block" other applications from gaining access to the port.

    ps: Port 80 is the RECEIVING port for HTTP, and has no impact on outgoing HTTP requests which use a dynamic port number.

    So unless the computer has IIS or equiv installed, nothing is on port 80 anyway....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Nov 2008
    Posts
    13

    Re: Disable computer port

    There is a firewall called zonealarm, it can provide you with all features that a firewall must and unlike Windows Firewall, it allows you to disable outgoing ports as well.

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