I am using VB Express edition with Windows XP Home Edition and would like to know how to build a firewall service.

I have no idea how to do this, but can somebody help me on this

I can't download 3rd party software because I am on dialup connection.

Any help for building a firewall

Thank you in advance.

Re: Visual Basic Express Edition Building a firewall service?

Martin Xie - MSFT

Hi Beethoven5th,

The Firewall service usually is based on packet filtering technology. You need to P/Invoke Packet Filtering API in VB.NET programes.

1. Simple Packet - Filter Firewall

Working of firewall is based on the following steps:

  • Extract the packet header
  • Check the protocol associated
  • Compare with the rules
  • Check the source and destination add. If protocol is same
  • Check out the port if protocol is TCP
  • Drop or pass the packet

2. Packet Filtering API on MSDN

Packet Filtering API allow us to associate filters to IP adapter interfaces. We can implement a functionality similar that included in TCP/IP filter options in TCP/IP properties of a network adapter.

3. Packet Filtering in .NET

Class library to implement packet filtering funcionality in your .NET applications

4. In addition, here is a Firewall SDK which helps deveopers create and manage a firewall control easily.

The Gtfctrl.dll wraps all the firewall operations in one "Firewall Panel", it can be used in VB.Net , C#.Net.

5. You also can find some ideas in this thread.

How to build a firewall like AVG Firewall in c#

6. The basics of a firewall

Best regards,