Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
The Ultimate Ubuntu Handbook

You're reading from   The Ultimate Ubuntu Handbook A complete guide to Ubuntu 24.04, from installation to advanced security and development

Arrow left icon
Product type Paperback
Published in Aug 2025
Publisher Packt
ISBN-13 9781835465202
Length 356 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Ken VanDine Ken VanDine
Author Profile Icon Ken VanDine
Ken VanDine
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Part 1: Getting to Know Ubuntu
2. Introduction to Ubuntu FREE CHAPTER 3. What’s New in Ubuntu 24.04? 4. Security and Transparency – The Advantages of Open Source Software 5. Getting Started with Ubuntu: A User’s Guide 6. Part 2: Getting the Most Out of Your Ubuntu System
7. Using Your Ubuntu Desktop 8. Software Discovery: Finding and Installing Applications 9. Software Updates: Enhancing Security and Stability 10. Getting Help: The Ubuntu Community and Beyond 11. Ubuntu in the Enterprise and at Scale 12. Command-Line Tricks and Shortcuts: Boosting Your Efficiency 13. Part 3: Security and Privacy
14. Introduction to Network Security 15. Understanding Firewalls 16. Safeguarding Information with Data Encryption 17. Part 4: Ubuntu, the Ultimate Development Platform
18. Ubuntu for Developers 19. Leveraging Containers for Development 20. Cloud-Style VMs on Your Desktop 21. Kubernetes Development on Your Desktop 22. Building Your Data Science Toolkit 23. Embracing the Spirit of Ubuntu 24. Other Books You May Enjoy
25. Index

UFW: your friendly firewall

UFW is Ubuntu’s default firewall management tool. It simplifies configuring iptables, making it user-friendly even for beginners. In Chapter 11, Introduction to Network Security, we discussed GUFW, the graphical interface for UFW. Now, let’s look at how to use UFW without GUFW’s convenience.

These are the basic UFW commands:

  • Check the status: sudo ufw status
  • Enable: sudo ufw enable
  • Disable: sudo ufw disable
  • Allow traffic: sudo ufw allow 80/tcp
    • Allows web traffic on port 80
  • Deny traffic: sudo ufw deny 22/tcp
    • Blocks SSH connections on port 22
  • Allow from specific IP: sudo ufw allow from 192.168.1.100 to any port 22

For example, this code allows SSH and HTTP traffic:

ken@monster:~$ sudo ufw allow 22/tcp
ken@monster:~$ sudo ufw allow 80/tcp
ken@monster:~$ sudo ufw enable
ken@monster:~$ sudo ufw status
Status: active...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
The Ultimate Ubuntu Handbook
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon