The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
IT NEWS            Site directors hint: Stay up to date Discuss now!
Technology news and Jobs arrow The Linux distillery arrow ufw ftw! Ubuntu 8.04’s uncomplicated firewall
ufw ftw! Ubuntu 8.04’s uncomplicated firewall PDF E-mail
User Rating: / 14
PoorBest 
by David M Williams   
Thursday, 03 April 2008
To enable ufw you just need to run one dead simple command:
sudo ufw enable

Conversely, you can turn it off later for any specific purpose or forever by
sudo ufw disable

Once you’ve turned ufw on you will want to run a command like
sudo ufw default deny

as given above so that you set the general fallback position that ufw will apply should any of the rules not cater for specific traffic. You needn’t make it block all incoming traffic by default; if you have a legitimate need to do so you can make ufw default to being mostly open by the similar command
sudo ufw default allow

This makes the default action to permit traffic unless a rule specifically denies it. However, you would want to be certain this is what you require and is best for your situation. Certainly, any Internet-facing servers would be best aided by having traffic blocked except anything you definitely wish to permit.

You might be keen to see what ufw is doing; in that case you can enable its logs by
sudo ufw logging on

And, as you might guess, you can suppress logging later by
sudo ufw logging off

So, ufw is pretty easy to get running and to configure, with rules added and removed at will and with great flexibility. By now you might be asking how you check what your rules are. Do you need to manually record them in a spreadsheet or text document?

The answer is no; with the simple command
ufw status

you can get an easy to read dump of all the rules. This is text based making it both readable to humans and also readable and able to be parsed by other commands. You can pipe the output from this into another program for analysis or further refining – perhaps grep, for instance, so you can programmatically determine if certain ports are open or not.

This status command need not be executed through sudo because it is read-only; it doesn’t require elevated permissions to display the current rules as they are.

For those who like to know what’s going on under the hood, ufw writes its rules to a config file called /etc/ufw/maps. The status command simply reads this config file and formats its output.
If you install the Hardy Heron – otherwise known as Ubuntu 8.04 – and find you’ve omitted ufw from being installed you can very simply and quickly bring it into being with
sudo apt-get install ufw

This will retrieve and install the ufw package making all the above available for use. You can check that this has worked via
dpkg –get-selections | grep ufw

If the output says ufw followed by install then it is ready and available.

Keep in mind that you – ie the human operator – are not the only one who will be setting firewall rules. As good as systems like iptables are, they have had one perceived deficiency from a Linux distribution point of view, namely they are not integrated into the package management facilities. Here’s where ufw has a real strength.

What does this mean? Please read on.

CONTINUED







 
< Next story in category   Previous story in the category >
Subscribe to iTWire's Free daily e-newsletter Delivered daily - FREE
Subscribe to our Technology newsletter, get the latest and stay ahead ...example
* First name:
* Last name:
* Your email address:
* Country:
* Enter the security code shown:

* mandatory


Search the web
Search iTWire

 
You don't need to login to post a comment





Lost Password?
No account yet? Register
Subscribe to our free daily newsletter.
Six Sigma Green Belt Training and Certification Workshop
July 4 (9:00 am) - July 06 (11:59 pm), 2008
eXample Consulting Group is conducting an immensely practical SIX SIGMA GREEN BELT CERTIFICATION ...

Ovum Breakfast Seminar: Telco 2.0 in the UC battleground
July 7, 2008 (7:30 am - 10:00 am)
Ovum would like to invite you to our forthcoming event on July 7, at which we will be discussing ...

Oceania Com
July 7 (8:45 am) - July 08 (11:59 pm), 2008
Informa Telecoms & Media and BuddeComm are delighted to announce the inaugural OCEANIACOM 7-8 J...

Energy Logic Symposium- Melbourne
July 8, 2008 (All Day)
Emerson Network Power, Dell, IBM and Cisco show you how to slash data centre energy use without c...

Financial Modelling in Excel - Brisbane CBD
July 9, 2008 (All Day)
Improve your decision making and business skills by learning to create your own dynamic and relia...

Budgeting & Forecasting in Excel - Brisbane CBD
July 10 (9:00 am) - July 11 (11:59 pm), 2008
Learn to create your own budgets, rolling forecasts, reports and scenarios. Explore budgeting te...

SIX SIGMA WORKSHOP - Bangalore
July 11 (9:00 am) - July 13 (11:59 pm), 2008
eXample Consulting Group is conducting an immensely practical SIX SIGMA GREEN BELT CERTIFICATION ...

KM Australia 2008
July 21 (8:00 am) - July 22 (11:59 pm), 2008
Web Linkwww.kmaustralia.com Moving forward with an enterprise approach to knowledge, information...

Usability Fundamentals Training Course [Melbourne]
July 21 (9:00 am) - July 22 (11:59 pm), 2008
The success of your website is inextricably linked to how well-versed those involved in the devel...

ISTQB Foundation Certification Course
July 22 (9:00 am) - July 23 (11:59 pm), 2008
This accredited and instructor-led course focuses on developing the student’s knowledge, understa...
New event listings
SolidWorks Innovation Day (Melbourne and Adelaide)
October 17, 2008 (All Day)
Hosted by Intercad, SolidWorks’ Innovation Days will give designers, engineers and manufacturers ...

SolidWorks Innovation Day (Sydney)
October 16, 2008 (All Day)
Hosted by Intercad, SolidWorks’ Innovation Days will give designers, engineers and manufacturers ...

SolidWorks Innovation Day (Brisbane and Perth)
October 15, 2008 (All Day)
Hosted by Intercad, SolidWorks’ Innovation Days will give designers, engineers and manufacturers ...

LIXI Industry Forum 2008
September 10, 2008 (All Day)
Wednesday, 10 September 2008 The Westin Sydney The second annual major industry event for the...

Last Day to apply for Mid Year study at Swinburne University
August 1, 2008 (All Day)
Applications close for Swinburne University’s online postgraduate Technical Communication courses.

The Rapidly Emerging Mobile Media Market
July 24, 2008 (All Day)
Mobile media is the way of the future, and by 2015, it is expected that it will be the major reve...

View Full Calendar
Contact , Register , Advertise with iTWire , Links , About iTWire , Feedback , Post your jobs , Events , iTWire site map , Start Blogging , MyBlogLog page
Industry Releases , Submit your release now