|
-
Oct 27th, 2005, 10:14 AM
#1
Thread Starter
Lively Member
Journey Quest::Open & Block a port
Dear Lord VB Porgrammer,
I, the slave of VB in need your humble help.
I've begin my quest on a journey to the "Hell of Winsock".
I was assigned to cast a spell that will create a creature that can "Close all the ports" and "open some specific ports" in order to secure my realm, so that no other intruders are allow.
Oh my VB lords, please help me where I could not cast a correct spell to the creature.
Please help me.
cast = Code/Coding spell = syntax creature = program/application realm = system/network no other intruders are allow = no one can hack in
-
Oct 27th, 2005, 02:26 PM
#2
Lively Member
Re: Journey Quest::Open & Block a port
I would say your best bet would be to download the free ZoneAlarm firewall - or other similar application. It would be much, much easier.
The only real way I can see a VB app "blocking" a port is for it to actually "use" that port - and keep that port open for the duration of the app. Since each TCP/IP interface has 65,535 associated ports, creating a VB app to "block" these ports will be a hog.
The only way I can see you accomplishing this is to create an array of 32,767 Winsock controls that listen on half the ports you want to close, and another array of 32,767 Winsock controls that connect to those listeners on the other half of the ports you want closed. In this manner, you have - in effect - used up all your ports, meaning that if anything tries to connect or use that port it will be unavailable. I am not sure what would happen if you kept these 32,767 connections "open" without any activity, so you may have to create a timer that would simply pass "dummy data" back and forth across those connection at certain intervals.
This is my first impression!
-
Oct 27th, 2005, 04:53 PM
#3
Re: Journey Quest::Open & Block a port
Except that would block everything, including networking, updates, html, telnet...
-
Oct 28th, 2005, 09:38 AM
#4
Thread Starter
Lively Member
Re: Journey Quest::Open & Block a port
hmm.... so there is no decent way to block or open ports in vb... hmm.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|