[VPM] Disable network source/dest. ports via perl....(a simple firewall)

Doug Snead semaphore_2000 at yahoo.com
Wed Dec 8 17:45:26 CST 2004

--- Jeremy Aiyadurai <jeremygwa at hotmail.com> wrote:
> how do i prevent an application from connecting to the net.
> eg. suppose i want to prevent Internet Explorer from
> accessing the net. how do i block the ports that 
> programs use, via perl. I am looking for a windows
> compatible solution.

Hmmm ... Windows has a firewall API you might be able to access
that would let you block ports under program control (this is
what a firewall should let you do).


And from perl ... In theory, you could access the windows
firewall API, from perl using the Win32::API Win32 Perl
Not sure which Windows perl that is for (or if it matters
which). I like the perl you may install with cygwin

Win32::API::Prototype is a wrapper around Win32::API that is
said to be easier to use. This one seems to use ActivePerl:

So, one way may be to poke around some and see how you can
access the Windows firewall API from perl via Win32::API. Then
you should be able to selectively block ports, including any
ports that IE may be using.


Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.

More information about the Victoria-pm mailing list