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           RSS Mastering The Complex Sale
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 Print E-mail
User Rating: / 14
PoorBest 
by David M Williams   
Thursday, 03 April 2008
One of the exciting new features coming up in the impending release of the brand spanking new Ubuntu 8.04 is the uncomplicated firewall known as ufw. This system will allow straightforward configuration of firewall rules and will also intelligently integrate with the rest of Ubuntu. Here's all there is to know about driving it and why it's a good move by Ubuntu.
One of the most compelling features of ufw is the work the authors have put in to make its syntax a little more for human beings than the conventional iptables firewall. Here’s some sample commands.

Firstly, to set the default policy to drop (deny) all connections:
sudo ufw default deny

Then to permit TCP connections on port 22
sudo ufw allow 22/tcp

You can allow or deny any individual port; for instance if you wished to prevent SMTP connections but not modify any other rules you would type
sudo ufw deny 25

This drops all connections coming in to port 25 – whether by TCP or UDP. As you can see from the above suggestion, we can specify whether the rules refer to TCP or UDP on an individual basis, or by omitting to specify both protocol forms are counted.

Additionally, ufw knows the names of all standard protocols. There’s no need for you to be cognoscente that SMTP is commonly port 25. The same command can also be written as
sudo ufw deny smtp

This therefore means you can turn on or off web traffic, e-mail, ftp, telnet, ssh and any and all common ports without having to look up what the underlying port numbers actually are. The service name matches what is listed in /etc/services.

You can also route traffic between source and destination IP addresses like so:
sudo ufw allow proto udp 192.168.0.1 port 53 to 192.168.0.2 port 53

The port numbers need not match if you wish to remap ports; perhaps you want to make your web server hidden from casual browsers; you might thus require people to use port 8080 when viewing it (e.g. http://website:8080); by using ufw in this way you can redirect incoming traffic on port 8080 to port 80 on your web server without actually opening port 80 to external users or exposing that machine to the internet.

Your rules can be easily revoked with commands like this:
sudo ufw delete allow 22/tcp

This now removes the rule we added earlier, to permit inbound traffic on TCP port 22.

It’s not uncommon that you might permit unrestricted traffic from a specific static IP address. ufw caters for this with commands like
sudo ufw allow from 192.168.1.50

And then, of course, it can be revoked with the equivalent delete command:
sudo ufw delete allow from 192.168.1.50

All this said, by default ufw is disabled. That’s because Ubuntu’s team don’t wish to impose a new tool upon users without their explicit acceptance. Further, users may have their own existing firewall system in place – be it iptables or something else.

So, the first thing you’ll need to do with ufw is actually turn it on and make it persistent so it starts upon reboot.

How do we do this? 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
Google
 
You don't need to login to post a comment





Lost Password?
No account yet? Register
Subscribe to our free daily newsletter.
9th Annual Business Intelligence
May 8 (8:00 am) - July 16 (11:59 pm), 2008
The drastic change of vendor landscape in 2007, which resulted by the big-time acquisition of the...

Applications open for postgraduate studies in Technical Communication at Swinburne University
May 13 (8:00 am) - September 09 (11:59 pm), 2008
Swinburne University runs two courses offering university-level qualifications to technical commu...

ISTQB Software Testing Certification Training
May 19 (9:00 am) - May 21 (11:59 pm), 2008
HEDLOC ISTQB Foundation Certification Course (3 Days, Sydney) The ISTQB Foundation Certificate i...

ISTQB Foundation Certification Public Training, Sydney, 19th May 2008
May 19 (9:00 am) - May 21 (11:59 pm), 2008
The ISTQB Foundation Certificate is an internationally recognised professional qualification in s...

ISEB/ISTQB Foundation Certificate in Software Testing - Melbourne
May 19 (9:00 am) - May 21 (11:59 pm), 2008
Disqover - Improving Software Quality offers software and systems testers the opportunity to beco...

CeBIT
May 20 (8:00 am) - May 22 (11:59 pm), 2008
CeBIT Australia is Australasia's leading Information & Communications Technology (ICT) event for ...

Free Webinar:Open Source Data Migration with Talend Open Studio
May 20, 2008 (9:00 am - 10:00 am)
This one-hour Webinar will present: - The specific constraints of data migration, including: hi...

Open Source webinar, what a Department of Homeland Security Scan Reveals about Open Source
May 21, 2008 (10:00 am - 11:59 pm)
A SD Times Webinar Wednesday, May 21, 2008, 1:00p.m. EDT / 10:00 a.m. PDT Launched as a joi...

Open Source Webinar
May 21, 2008 (10:00 am - 11:59 pm)
Open Source Uncovered, what a Department of Homeland Security Scan Reveals about Open Source A S...

HP Quality Center Dashboard Public Training, Perth 22nd May 2008
May 22, 2008 (9:00 am - 11:59 pm)
This hands-on instructor-led course covers the features of the Quality Center 9.2 Dashboard. This...
New event listings
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.

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...

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

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

View Full Calendar
Add New Event
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