<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9" -->

---
title: Getting started with UFW: The Uncomplicated Firewall...
description: UFW (Uncomplicated Firewall) simplifies Linux firewall configuration through a strategic approach rather than a simple on/off switch. The walkthrough covers...
canonical: https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Getting started with UFW: The Uncomplicated Firewall strategy | daily.dev
og:description: UFW (Uncomplicated Firewall) simplifies Linux firewall configuration through a strategic approach rather than a simple on/off switch. The walkthrough covers...
og:url: https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9
og:image: https://api.daily.dev/og/posts/JIjzTMTg9.png
og:image:alt: Getting started with UFW: The Uncomplicated Firewall strategy
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with UFW: The Uncomplicated Firewall strategy

**[All Things Open](https://daily.dev/sources/allthingsopen)** · 3 min read · 1 upvotes · 0 comments

## Summary

UFW (Uncomplicated Firewall) simplifies Linux firewall configuration through a strategic approach rather than a simple on/off switch. The walkthrough covers setting default policies (deny incoming, allow outgoing), restricting SSH access to a specific IP while leaving web server ports 80/443 open to the public, using icanhazip.com to find a public IP, enabling rate limiting to block brute force attacks, opening port ranges and subnets, and using journalctl for logging. GUFW is mentioned as a graphical alternative for desktop users, and the piece explains why silent deny is more secure than explicit reject.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://allthingsopen.org/articles/getting-started-ufw-uncomplicated-firewall-strategy>

## Questions this post answers

### How do I restrict SSH access to only my IP address using UFW?

First find your public IP address using a service like icanhazip.com, then create a UFW rule allowing SSH only from that specific IP instead of allowing it from anywhere. This is combined with a default deny-incoming policy, so SSH becomes accessible only to you while other ports remain blocked unless explicitly opened.

_daily.dev surfaces practical security walkthroughs like this for developers hardening their own servers._

### Why should a web server allow SSH only from one IP but leave HTTP and HTTPS open to everyone?

A web server needs ports 80 and 443 open publicly because it must serve visitors from anywhere, while SSH should be restricted to a single trusted IP because it grants administrative control and is a common brute-force target. Applying a default deny-incoming, allow-outgoing policy first, then opening only the necessary ports, follows a zero-trust approach to server security.

_Developers weighing which ports to expose can find this kind of security reasoning through daily.dev._

### Does UFW support rate limiting to block SSH brute force attacks?

Yes, UFW includes built-in rate limiting that can block repeated connection attempts, such as SSH brute force attacks, automatically with a single command. Combined with medium-level logging viewable through journalctl, this lets administrators both prevent and monitor suspicious login attempts without writing custom firewall scripts.

_daily.dev helps sysadmins keep up with practical firewall hardening techniques like SSH rate limiting._

## Similar posts on daily.dev

- [What Firewalls Really Do and Why Every Network \(Still\) Needs Them](https://daily.dev/posts/what-firewalls-really-do-and-why-every-network-still-needs-them-bpgz1jknd) · freeCodeCamp · 3 upvotes · 0 comments
- [Iptables Essentials: Common Firewall Rules and Commands](https://daily.dev/posts/iptables-essentials-common-firewall-rules-and-commands-bsbmrphdb) · DigitalOcean Community · 0 upvotes · 0 comments
- [Docker bypasses your firewall silently, and most home labs don't realize it](https://daily.dev/posts/docker-bypasses-your-firewall-silently-and-most-home-labs-don-t-realize-it-spygdglss) · XDA Developers · 2 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#linux](https://daily.dev/tags/linux), [#ssh](https://daily.dev/tags/ssh), [#firewall](https://daily.dev/tags/firewall)

[View this post on daily.dev](https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Getting started with UFW: The Uncomplicated Firewall strategy","url":"https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9"},"datePublished":"2026-08-28T06:50:48.861Z","dateModified":"2026-09-13T18:57:43.986Z","description":"UFW (Uncomplicated Firewall) simplifies Linux firewall configuration through a strategic approach rather than a simple on/off switch. The walkthrough covers...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/575af55b2cbb07bf2225144e5406cb14?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/575af55b2cbb07bf2225144e5406cb14?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"All Things Open","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"All Things Open","logo":"https://media.daily.dev/image/upload/s--dgFP6zAp--/f_auto/v1720885901/logos/allthingsopen","url":"https://daily.dev/sources/allthingsopen"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,linux,ssh,firewall","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"All Things Open","item":"https://daily.dev/sources/allthingsopen"},{"@type":"ListItem","position":3,"name":"Getting started with UFW: The Uncomplicated Firewall strategy"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/getting-started-with-ufw-the-uncomplicated-firewall-strategy-jijztmtg9#faq","mainEntity":[{"@type":"Question","name":"How do I restrict SSH access to only my IP address using UFW?","acceptedAnswer":{"@type":"Answer","text":"First find your public IP address using a service like icanhazip.com, then create a UFW rule allowing SSH only from that specific IP instead of allowing it from anywhere. This is combined with a default deny-incoming policy, so SSH becomes accessible only to you while other ports remain blocked unless explicitly opened. daily.dev surfaces practical security walkthroughs like this for developers hardening their own servers."}},{"@type":"Question","name":"Why should a web server allow SSH only from one IP but leave HTTP and HTTPS open to everyone?","acceptedAnswer":{"@type":"Answer","text":"A web server needs ports 80 and 443 open publicly because it must serve visitors from anywhere, while SSH should be restricted to a single trusted IP because it grants administrative control and is a common brute-force target. Applying a default deny-incoming, allow-outgoing policy first, then opening only the necessary ports, follows a zero-trust approach to server security. Developers weighing which ports to expose can find this kind of security reasoning through daily.dev."}},{"@type":"Question","name":"Does UFW support rate limiting to block SSH brute force attacks?","acceptedAnswer":{"@type":"Answer","text":"Yes, UFW includes built-in rate limiting that can block repeated connection attempts, such as SSH brute force attacks, automatically with a single command. Combined with medium-level logging viewable through journalctl, this lets administrators both prevent and monitor suspicious login attempts without writing custom firewall scripts. daily.dev helps sysadmins keep up with practical firewall hardening techniques like SSH rate limiting."}}]}
```

