Developing a firewall application in C#


I want to develop a firewall application in C#, but I don't have enough information on how to do that. If anybody can provide me with some resources (tutorials, articles, sample source code, books) I would be grateful.

Thanks in advance.

Best Regards,
Wessam Fathi
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

that will be quite hard to do because AFAIK you won't be able to bind your c# apps to ports that are already in use etc.
You could look at the pcap lib or something like that but are you sure you want to write a firewall yourself when there are so many well tested solutions?
deserteagle_83Author Commented:
Well I'm not writing a firewall to compete with other companies :) It's my graduation project (I'm a computer science student).
I think you need to look for a packet capture library or write one on your own, preferably in a more low level language. Then use those captures in a c# app an check them against rulesets.
Watch out for buffer checking and strcpy etc in the low level lib if you write it yourself.

Did you pick that grad project yourself or was it assigned? Either you are a glutton for punishment or your teacher is crazy
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

deserteagle_83Author Commented:
Thanks for your replies, actually I did choose my graduation project and it was the firewall, and an antivirus application too.

I think it will be ok to write a packet capture library in a low level language, if you know any resources that can help me with that I will be grateful.

Thanks again,
Wessam Fathi
I don't know about any good resources that you can't google up, the only lib's I know of are pcap and ethereal
you might want to look at this thread:

they are saying pcap only offers capturing packets and not rejecting connections based on it, and thatyou would have to use LSP or look at  this url (which seems a good resource to me)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.