I am beginning work on an intelligent firewall but before I do that I need to understand clearly how a very basic firewall will work. Since me and my team is most comfortable in C we are going to use that.
Could someone give example of a very basic firewall written in C.
Developing a correct firewall is no trivial task. You need a full understanding of the underlying operating system’s network stack and of the various protocols at all layers of the OSI model.
The netfilter/iptables project, responsible for the most widely used packet filtering software for Linux, is open source, and should provide you with a good view of what goes into a firewall. It’s certainly not in the “very basic” category, but I’d be wary of any firewall software the claimed to be “very basic.”