[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How To Block ALL PORTS

Posted on 2004-10-15
6
Medium Priority
?
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Accepted Solution

by:
sftweng earned 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

649 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