NOTE: IF YOU DONT HAVE THE WINDOWS DDK (windows XP DDK or better) THEN THIS FILE IS PROBABLY USELESS!

Description:
Allows simple rules to be implemented to control network traffic at the moment
only protocol type can be used to filter traffic.

Installation:
Run a free windows XP build command prompt from the ddk shortcuts, change to the
directory you unzipped this file to then run linkit.bat.
Once you have the passthru.sys file you will need to download the "Extending the PASSTHRU Sample - Part II" from http://www.wd-3.com/ (its under articles) and get the files "netsf.inf" and "netsf_m.inf". Once you have these files in the same directory as the driver you can install it by going into properties on your network adapter then clicking install, service, have disk, browse to this directory and use the inf file that appears.

Usage:
Note: I would definately recommend using this driver in a virtual PC rather than on a real computer as its still unstable.

Once installed you are ready to setup a config file with your firewall rules, an example config can be found in this zip file although it will need modifying. 
Run the firewall control application with the /enum switch to get detailed networking information. You should see something like this:

Driver Bindings:
   "\Device\{B3B985AD-EB56-4F6A-8D16-131118E52131}"
      "\DEVICE\{9C9770B5-CFBC-41DF-BE1D-510CEC826190}"  <-- Lower Adapter Name
      Description: " National Semiconductor Corp. DP83820 10/100/1000 GigPhyter PCI Adapter"
      Medium: 802.3
      Mac address = 00-40-F4-00-07-B5
      Media Connect Status: Connected

   "\Device\{03BB2564-4AA2-4E9B-B251-79D6A69B461F}"
      "\DEVICE\NDISWANIP"
      Description: " NdisWan Adapter"
      Medium: 802.3
      Mac address = A6-3E-20-52-41-53
      Media Connect Status: Connected

Your output may look slightly different depending on the network adapters in your computer but your should get the lower adapter name line without the quotes from the adapter you want to filter traffic on and replace the line in the config file with yours.

To apply the ruleset simply run the firewall control application with the /set FILENAME switch replacing FILENAME with your ruleset file name.


Description of example rules:
-A INPUT -p !ICMP -J ACCEPT
Add the rule to not accept ICMP traffic coming in

-A OUTPUT -p !ICMP -J ACCEPT
Add the rule to not accept ICMP traffic going out

The only other avaliable options for the -p option is TCP and UDP.


Legal blah:
I am not responsible for any damage that may come to you , your computer , your dog etc through the use of this program.
WARNING: This driver has not be thoroughly tested and there are likely to be bugs which may cause your computer to crash with a BSOD.

Due to Microsoft licensing requirements I cannot redistribute the source code or
a binary version of this driver as it uses alot of the code found in the
passthru sample in the ddk. Hopefully in the future I will be able to make my own
NDIS driver from scratch and thus get around this.