Solved

How To Block ALL PORTS

Posted on 2004-10-15
6
392 Views
Last Modified: 2012-05-05
I need some code that illustrates how to block all ports for a computer such that no (Zero) internet activity can occur. ( and then be able to turn them back on again, just like a Firewall blocking all ports).

Q2
0
Comment
Question by:quantum2
6 Comments
 
LVL 6

Expert Comment

by:Sergio_Hdez
ID: 12319030
A hook on the TCP/IP stack calls? Just wondering...
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12323855
Perhaps you could start here http://winpcap.polito.it/ or with the Windows DDK
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12323897
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 7

Accepted Solution

by:
sftweng earned 125 total points
ID: 12324042
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 12326698
if it's a lan connection, you could simply clear your gateway, so data can not route
(route delete 0.0.0.0)
and reset it after to your lan gateway
route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.1 (if .1 is your router/gateway)
0
 
LVL 1

Author Comment

by:quantum2
ID: 12355357
Hey Sftweng,
thanks for the links. This will help a great deal. If you are interested, I will give you 300 more points if you take the Winsockfirewall code and create an sample application that has the following.

one form, two buttons.

Button 1 - Block all traffic
Button 2 - Enable traffic

Thats it.

While I havent looked at this code in great detail, it would appear that this is as simple as assigning a IP range rule from 0.0.0.1 to 255.255.255.255

I got slammed at work and dont have time to weed through all of this, so if you are interested in creating a sample that uses their code and any libraries, all I would need is the units necessary to make the sample work as well as any components they are dependant on and the above listed functionality.

Thanks for the help

Q2
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now