Solved

How To Block ALL PORTS

Posted on 2004-10-15
6
394 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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