Firewall Builder
A firewall configuration GUI
Download the whole article as PDF
Short URL: http://fsmsh.com/2071
- 2007-07-04
- User space | Advanced
-
Write a full post in response to this!
This content was sponsored by:
Have you ever wanted to configure a personal firewall for your GNU/Linux box, but were scared of the complexity of iptables? Well, I might not be able to make you a security expert, but I can show you a tool that will help you to configure your personal firewall the easy way. The secret? Firewall Builder (also known as fwbuilder for short).
Firewall Builder is a graphical user interface (GUI) that allows you to configure a number of firewall engines in many different environments. As of version 2.0.9 it supports these firewall softwares:
- FWSM
- ipfilter
- ipfw
- iptables
- PF
- PIX
and these environments:
- FreeBSD
- Cisco FWSM
- Linksys/Sveasoft
- GNU/Linux (kernel 2.4 and 2.6)
- MacOS X
- OpenBSD
- Cisco PIX
- Solaris
Obviously, if I had to talk about internet security in general and about all possible uses of Firewall Builder on all the possible platforms, I’d be better off writing a book. Therefore, I’ll focus on a specific case—configuring a “personal” firewall (that is, a firewall that protects just the one computer it is running on) on a DHCP-configured machine. I will create the basic configuration with a wizard and add some customisations afterwards.
Firewall Builder is a graphical user interface (GUI) that allows you to configure a number of firewall engines in many different environments
The platform I will work on is:
- Linux 2.6 (Debian Testing)
- iptables 1.3.6
- Firewall Builder 2.0.9
I will assume that you already installed Firewall Builder on your system (using apt-get or Synaptic Package Manager, for example).
Firewall Builder releases
Firewall Builder 2.0.9 is not the latest release available, but it’s the one that currently ships with distributions like Debian Testing and Ubuntu Edgy. The latest release is the 2.1.10, which you can compile by yourself by downloading the source from SourceForge.
Starting Firewall Builder
You can run Firewall Builder by finding it in a menu and clicking on its icon, by simply firing up a terminal window and typing fwbuilder. The program will come out with a welcome window that asks if you want to open an existing file or create a new project: choose to create a new one and give a filename, then click on “Next”.
You are then asked if you want to use a Revision Control System and if you want this project to be the default one. We are just playing around, so leave them unchecked and go ahead with “Finish”. The real game starts now.
Look at the “Firewalls” folder at the top left: it’s empty and we are going to create a new one. Right click on the folder and choose “New firewall” from the context menu.
You are now asked for a name, a firewall application and an operating system: for the name, choose any one you like (“ifts” is the name I give to my firewall for historical reasons); for the other two, I am assuming you are using iptables on GNU/Linux. To use the wizard, be sure to check the “Use preconfigured template firewall objects”.
At this point you are presented a list of canned templates. Please choose “host fw template 1” and go ahead.
After a few moments you are shown a graphical representation of the pre-set rules for this template. As you will easily realize, you can accept SSH connections, ping requests and other useful ICMP requests (rule 0); you will also be allowed to open connections to anywhere you like (rule 1). The last rule (rule 2) will be the one that will be used if neither rule 1 nor rule 2 match: the connection is denied and the attempt is logged.
Assuming that you are satisfied with these rules so far, how do you actually use them?
Just press the gear button (Compile) in the button bar. A window like the one above will appear. Since it says “Policy compiled successfully” you may well expect to find something somewhere that will finally activate your brand new firewall, but where?
Just look at the first line, it says
fwb_ipt -f /home/bronto/ifts.fwb -d /home/bronto ifts
Since /home/bronto/ifts.fwb is my source file, then something “ifts”-related has been probably built in /home/bronto, my home directory. Just take a look (using Nautilus or using the command line) and you will find a .fw file in that directory (in my case: /home/bronto/ifts.fw). It’s a shell script that you may want to take a look at: you will see that he rules you created graphically have been transformed into iptables commands.
To apply those rules, just run that script as root and you’re done.
If you don’t want to use the command line, and you are using GNOME, you will need to open a “root Nautilus window”. To do so, press ALT-F2 (under GNOME) and type: gksudo "nautilus --browser". Find your home directory (in my case, /home/bronto) and double click on the file ifts.fw. Choose the option “Run in terminal”, and voilà - the firewall command is run!
If you are more accustomed to using the command line, you can run the newly created script by opening a terminal and running:
$ sudo /home/bronto/ifts.fw
It’s just been a few minutes using Firewall Builder and you already have a firewall running on your PC!
Write a full post in response to this!
Similar articles
Do you like this post?
Vote for it!
Copyright information
This article is made available under the "Attribution-NonCommercial" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by-nc/3.0/.
Biography
Marco Marongiu: Born in 1971, Marongiu graduated in applied mathematics in 1997; he's now a full-time system administrator for a company funded by the Local Government of Sardinia, Italy. He's also a Perl programmer and technical writer and lecturer by passion, and is interested in web and XML related technologies. Marongiu has been a Debian User since version 1.1.10 and he helped found the GULCh Linux Users Group (Gruppo Utenti Linux Cagliari), the first one in Sardinia. A few years ago he became a father to his first son Andrea, and he's been trying to reorganise his life since, so that he can start writing technical articles again and holding seminars.
- Login or register to post comments
- 35143 reads
- Printer friendly version (unavailable!)




Two fantastic free software companies that make Free Software Magazine possible:
Buzz authors
Free Software news
- Two More Bills in the SCO Bankruptcy and Some Trademark Oddities
- Psystar Files Motion to Leave Chapter 11
- Swiss court: Gov can buy M$ licenses, but has to be aware of risk that contracts could be declared void during main process !freesoftware
- after using the #gimp for more than 3 years for my modest needs, I start to get familiar with it ;) #freesoftware #linux
- #vim users: favourite feature? For me it's ":set paste" real time saver - !freesoftware
Similar entries
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
2009: software installation in GNU/Linux is still broken -- and a path to fixing it
Tony Mobily, 2009-06-23 -
The Bizarre Cathedral - 44
Ryan Cartwright, 2009-06-08 -
Free Software Magazine caught in the 3fn shutdown crossfire
Tony Mobily, 2009-06-05 -
Is Android the key to the GNU/Linux desktop? Really?
Tony Mobily, 2009-06-12 -
The Bizarre Cathedral - 45
Ryan Cartwright, 2009-06-15
Hot topics - last 21 days
-
2009: software installation in GNU/Linux is still broken -- and a path to fixing it
Tony Mobily, 2009-06-23 -
The Bizarre Cathedral - 45
Ryan Cartwright, 2009-06-15 -
Will Google Wave revolutionise free software collaboration?
Ryan Cartwright, 2009-06-15 -
The Bizarre Cathedral - 46
Ryan Cartwright, 2009-06-22






Excellent software and nice article
Submitted by bsnipes on Tue, 2007-06-05 16:00.
Vote!I have been using fwbuilder for about a year now and it is excellent. In my case it is on a firewall ( running Debian ) with 2 different Internet connections plus the local area network and a couple of vpn tunnels. It is nice to be able to point, click, drag and drop to manage it.
I sometimes use another one
Submitted by leonpmu on Thu, 2007-07-05 15:54.
Vote!It is called Guarddog, which is also a frontend to iptables, also vry solid and simple. Even has a list of the popular apps etc, so it even understnads what ports what app normally / do use and can also open / close said ports.
I like the layout of your article, a nice clear, almost howto.. with screenies!!
Keep up the good stuff...
fw compiler w/ learning curve
Submitted by undefined on Thu, 2007-07-05 16:58.
Vote!i've used fwbuilder for several years and don't know what i would do without it, but all the home users i've recommended it to have thought it too much and seem to prefer "prefabricated" firewall scripts (of which there are about a dozen to choose from).
i think of fwbuilder as a firewall compiler. it uses higher level abstractions to generate iptables (or pf, ipf, ipfw, etc) primitives. and even though i only run one platform (linux), which negates the cross-platform benefit of fwbuilder, i still appreciate fwbuilder's abstractions, much like most general computing is on x86, but we don't write our software in assembler. fwbuilder has even added features to generate better/smarter scripts which my firewall rules have benefited from though my high level abstractions have remained virtually unchanged (LAN, internet through dial-up or broadband, wireless DMZ with OpenVPN connectivity to LAN, etc) all this time.
so, from my experience (myself and others) there is a learning curve, but for anything complex fwbuilder is easier than learning and writing iptables "assembly". (hopefully this article will help people get over the initial learning curve even for simple setups.)
Shorewall, Firestarter and Arno's iptables firewall
Submitted by irbis on Mon, 2007-07-09 21:15.
Vote!Firewall builder may be excellent for experienced users and those having a LAN and several machines networked (in other words, in need of all the configuration options) but it is way too complicated for most home uses who just need to configure simple and restrictive firewalling for their one and only home PC. I think even Shorewall would be simpler while still offering all the configuration options ever needed even in a very complicated network (besides, Shorewall also has probably the best documentation out there). But for home users who don't want to study Linux firewalling very much, something like Firestarter (especially for Gnome and with a GUI) or Arno's iptables script (Debian, Ubuntu etc. configure it for you automatically if you wish) would be very good.
Thanks for the quick overview
Submitted by dmflad on Thu, 2007-07-19 10:35.
Vote!Have used Firestarter and tried FWBuilder but got too confused and gave up for awhile. Really want to take advantage of FWB's writing iptables for different routers - I have to provide fire wall info for my severs to our DMZ admins and think FWB might be clearest way to do it. I am convinced the bosses of the DMZ admins have recreated Dante's Inferno here in out network and conversations with them...well, the more I know about FWs the better off I'll be. The DMZ admins are great but maybe as confused as me about rule building. Thanks Marco for the gentle reminder of FWB and a encouragement to "give it a try".
GREAT FWBuilder
Submitted by Anonymous visitor (not verified) on Thu, 2007-09-20 22:54.
Vote!thank you i have tried firestarter, then guarddog but this has blown
me away.
thank you for a clear and very easy to follow tutorial on FWB.
you have expanded my mind to another level and now ill go and learn
more so a big thank you again.
AV
PS, by the way do you write other linux tutorials ?
Re: GREAT FWBuilder
Submitted by Marco Marongiu on Thu, 2007-10-25 22:27.
Vote!Hello Anonymous
First of all, I would like to thank you and all other people that was so nice to compliment me for the article.
Second, sorry if I am replying in late of one month, but for reasons I don't know it seems I didn't get any notification of your comment.
About Linux tutorials, you can find a few here in FSM, and some older ones around the net (e.g.: one of the oldest, in Italian, can be found at http://www.pluto.it/files/journal/pj9704/sendmail.html; ten years now...).
Are you looking for something in particular?
Ciao
--Marco