6

I am a newbie to this domain, so i kept researching on ufw and iptables. But I cant distinguish them clearly because in every article /blog both of these names are present and I am really confused whether these are similar or not. I know ufw is a firewall(if i am not wrong), but why is it always linked with iptables? What is better a firewall or an iptable? Thank you.

3
  • Iptables can do everything, but it is hard to set up. Ufw solves this, but it has lesser skills.
    – peterh
    Apr 28 '20 at 6:02
  • Hello @peterh-ReinstateMonica thank you for your comment, so what type of skills does iptables have more than ufw?Any website where I can find these? Does those skills apply only to ufw or for all types of firewalls?
    – HelloWorld
    Apr 28 '20 at 6:14
  • You have to understand that (currently) ufw is implemented over iptables. So whatever you do in ufw will end up as iptables. So that's simple logic that tells that whatever ufw can do, iptables can do it. The reverse might not be true.
    – A.B
    Apr 28 '20 at 9:56
12

I ain't afraid of no quake i mean firewall! [ref.1]

TL;DR PART

a simple image about pizza can answer sometimes many questions :)

Take a good look at this picture, then read the text below:

(IMAGE) Pizza as a Service — by Albert Barron

We start from the left (blue means, you have to manage it, green means the vendor/software manages it)

  1. Made at Home - Netfilter (Nightmare - Damn I'm Good)
  2. Take and Bake - Iptables (Hard - Come Get Some)
  3. Delivery - UFW (Normal - Let's Rock)
  4. Dining out - Some 1-clicks or predefined setups (Easy - Piece of Cake)

UFW is something like a simplistic interface to get basic things done with your firewall.

How much you want to manage, depends solely on you :)

THE LONGER PART

part I: i found a pretty decent and easy to understand article for the UFW: Understanding UFW

part II: this guide shows you the slight deeper using of iptables: The Beginner’s Guide to iptables, the Linux Firewall

part III: here are informations about the packetfilter, this is the basis of many firewall solutions A Deep Dive into Iptables and Netfilter Architecture

the parts are based on hierarchy, top is dependant on the lower ones.

[ref.1] (From Duke Nukem 3D - Referencing id Software's 1996 PC FPS game Quake)

2
  • 1
    dude, thank you! besides being a good read it makes me wanna play duke 3d once again... good times!
    – resi
    Jan 6 at 13:00
  • 1
    ...and buy pizza
    – volvox
    May 12 at 8:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.