Wilders Security Forums  

Go Back   Wilders Security Forums > Software, Hardware and General Services > all things UNIX
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread
  #1  
Old June 30th, 2011, 07:48 AM
kaidranzer kaidranzer is offline
Infrequent Poster
 
Join Date: Jun 2011
Posts: 5
Default Building a firewall from scratch

Hi guys! I am trying to build an opensource firewall from scratch in linux environment using C and would like to have some help. Even though its called a firewall, its more of a Unified Threat Management containing features like antispam, content filtering, vulnerability analyzing,etc.

I need some suggestions about which features to include because I only have 1 year to complete this project.

I have started my preparations by learning UNIX Socket API and I have a pretty good knowledge of C. Can you please suggest me how should I start my work on this project?
  #2  
Old June 30th, 2011, 11:11 AM
0strodamus's Avatar
0strodamus 0strodamus is offline
Frequent Poster
 
Join Date: Aug 2009
Location: US
Posts: 671
Default Re: Building a firewall from scratch

I think an application based firewall is something that is sorely lacking in the Linux world.

I know the usually response from the Linux community is that an application firewall and antivirus aren't needed, but it is the lack of those two things that keep me in the Windows camp. I know that I could get an AV going using Dazuko, but it is a PITA. Anyway, sorry to digress. I think you should make an application filtering firewall.
  #3  
Old June 30th, 2011, 01:12 PM
kaidranzer kaidranzer is offline
Infrequent Poster
 
Join Date: Jun 2011
Posts: 5
Default Re: Building a firewall from scratch

What I am planning to do is breaking a packet into headers and data. Header analysis will be the "packet-filtering firewall" kind of thing and analyzing the data would be an "application-layer firewall" kind of thing.

Actually I have broken the process of development in 4 stages namely :

1. Capture the packet (using libcap)
2. Break the packet into headers and data (using libpcap)
3. Analyze the headers and data and make a decision
4. ACCEPT or DROP the packet (using netfilter in linux)

Its the third step that will depend on the features which are included in the project. I plan to code using the UNIX Socket API.

I need to know whether I am on the right track
  #4  
Old June 30th, 2011, 02:05 PM
1000db's Avatar
1000db 1000db is offline
Frequent Poster
 
Join Date: Jan 2009
Location: Missouri
Posts: 657
Default Re: Building a firewall from scratch

YOu might get a better response posting this to the All Things Unix section; just a thought.
  #5  
Old June 30th, 2011, 05:41 PM
JRViejo's Avatar
JRViejo JRViejo is offline
Global Moderator
 
Join Date: Jul 2008
Posts: 10,455
Default Re: Building a firewall from scratch

Moved Thread to this Forum for More Exposure!
__________________
JR
"You don't have to win every argument. Agree to disagree." Regina Brett
  #6  
Old June 30th, 2011, 08:00 PM
J_L's Avatar
J_L J_L is offline
Massive Poster
 
Join Date: Nov 2009
Posts: 4,833
Default Re: Building a firewall from scratch

Is it an application for Linux machines, or a gateway? What are all the features you've already planned?
__________________
  #7  
Old July 1st, 2011, 01:58 AM
mack_guy911's Avatar
mack_guy911 mack_guy911 is offline
Very Frequent Poster
 
Join Date: Mar 2007
Posts: 2,483
Default Re: Building a firewall from scratch

inspiration form ipcop smoothwall endian or pfsense and make them

install local type with interface then it would be great

http://www.wilderssecurity.com/showt...hlight=clearos

http://www.wilderssecurity.com/showt...hlight=clearos


these are old threads of utm but hope give you help

http://doc.pfsense.org/index.php/2.0...es_and_Changes
  #8  
Old July 1st, 2011, 02:08 AM
kaidranzer kaidranzer is offline
Infrequent Poster
 
Join Date: Jun 2011
Posts: 5
Default Re: Building a firewall from scratch

No it is not an application for linux machines. It will be a gateway between a network/LAN and the Internet.

Here are some of the features that look good enough :

http://www.endian.com/en/products/fe...-feature-list/

But I still cant decide which of these to choose because one year looks like a very short time to implement all of these.
  #9  
Old July 1st, 2011, 04:30 AM
mack_guy911's Avatar
mack_guy911 mack_guy911 is offline
Very Frequent Poster
 
Join Date: Mar 2007
Posts: 2,483
Default Re: Building a firewall from scratch

endian is fork for ipcop which is again fork of smoothwall

i guss you should look these

http://www.smoothwall.org/

http://pfsense.org/

http://m0n0.ch/wall/quickstart.php

are good to check the features to start on with
  #10  
Old July 1st, 2011, 08:48 PM
J_L's Avatar
J_L J_L is offline
Massive Poster
 
Join Date: Nov 2009
Posts: 4,833
Default Re: Building a firewall from scratch

If you want other products to look at, I have plenty on my list.
__________________
  #11  
Old July 2nd, 2011, 12:04 PM
kaidranzer kaidranzer is offline
Infrequent Poster
 
Join Date: Jun 2011
Posts: 5
Default Re: Building a firewall from scratch

Yes please. I would like to have a look.
  #12  
Old July 6th, 2011, 10:57 AM
kaidranzer kaidranzer is offline
Infrequent Poster
 
Join Date: Jun 2011
Posts: 5
Default Packet filtering in linux

Hi guys! I am attempting to build an open source firewall in linux and I need to know how to filter packets WITHOUT using iptables. Once a packet is inspected, a decision is made whether it should be dropped or not. Now to drop the packet I need to stop it from entering the kernel in the first place otherwise it would be forwarded automatically.

How do i do that? Is it possible using netfilter?

Reply will be highly appreciated.

Thanx in advance
  #13  
Old July 10th, 2011, 03:22 PM
kaidranzer kaidranzer is offline
Infrequent Poster
 
Join Date: Jun 2011
Posts: 5
Default Developing a packet-filtering firewall in linux

Hi guys! I have decided build an open source firewall in linux environment. I have exactly one year to complete this project. The firewall will be a stateful packet filtering firewall working at network, transport and application layers. I would also be provided log analysis features. What I want to know is whether this is a good enough project or put in other words, is it a worthwhile project to undertake?

Thanx in advance
  #14  
Old July 10th, 2011, 03:40 PM
LowWaterMark LowWaterMark is offline
Administrator
 
Join Date: Aug 2002
Location: New England
Posts: 15,525
Default Re: Building a firewall from scratch

Merged three separate threads together. There is no need to start a new thread every few days about this. Just use this existing thread if you have something else to add or ask.
  #15  
Old July 11th, 2011, 07:12 PM
Spooony's Avatar
Spooony Spooony is offline
Frequent Poster
 
Join Date: Apr 2011
Posts: 514
Default Re: Building a firewall from scratch

How about the AirGap Firewall. I.E pull the plug

Note: AirGap Firewall is a registered trademark of Paranoid Inc.
__________________
I've discovered that people on IRC don't get offended or riled up by racism, nor politically incorrect jokes, nor feminism, nazism, nor goatse, or even tubgirl, not even jokes about 9/11 get a rise out of anybody but as soon as I tell somebody that macs are better than PCs, things get ugly.
  #16  
Old July 14th, 2011, 01:17 PM
Alphalutra1's Avatar
Alphalutra1 Alphalutra1 is offline
Very Frequent Poster
 
Join Date: Dec 2005
Location: 127.0.0.0/255.0.0.0
Posts: 1,160
Default Re: Building a firewall from scratch

Remember, iptables is a front-end for netfilter. So you'd just have to implement a different front-end for netfilter. I know of one alternative already, nftables. So look into iptables and nftables source code to see how others have solved your project. Then, design your own.
__________________
Proud user of Gentoo, OpenBSD, dwm, (n)vi, heirloom-mailx, and pf
 

Wilders Security Forums > Software, Hardware and General Services > all things UNIX « Previous Thread | Next Thread »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Settings
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:03 AM.


Powered by vBulletinฎ Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ฉ2002 - 2013, Wilders Security Forums