Skip to content
Back to skills

Ufw Firewall Configuration

ASecurity

Use when: opening ports via UFW in Ansible tasks, configuring firewall rules for Docker services, or allowing TCP/UDP traffic through the host firewall on Debian-based systems.

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 1, 2026
devopsdocker

Security analysis

A100/100

Scanned September 1, 2026

npx -y skills add jimmybish/homelab --skill ufw-firewall-configuration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ufw Firewall Configuration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ufw Firewall Configuration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jimmybish-ufw-firewall-configuration/badge)](https://www.skillsdirectory.com/skills/jimmybish-ufw-firewall-configuration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ufw-firewall-configuration
description: 'Use when: opening ports via UFW in Ansible tasks, configuring firewall rules for Docker services, or allowing TCP/UDP traffic through the host firewall on Debian-based systems.'
---

# UFW Firewall Configuration

Ansible task pattern for opening ports via UFW on Debian-based hosts.

## When to Use

- A Docker service exposes a port that needs to be accessible
- A service has a web interface (firewall rules are REQUIRED for proxy access)
- You need to allow TCP or UDP traffic through the host firewall

## Task Pattern

```yaml
- name: Allow service port through UFW
  community.general.ufw:
    rule: allow
    port: "{{ <service>_port }}"
    proto: tcp
  when: ansible_os_family == "Debian"
```

## Notes

- If the service has a web interface, firewall rules are REQUIRED since ports must be exposed for proxy access
- Use `proto: tcp` for HTTP/HTTPS services (most common)
- Use `proto: udp` for UDP-based services (e.g., DNS, SNMP)
- The `when: ansible_os_family == "Debian"` guard ensures this only runs on Debian/Ubuntu hosts
- For services with multiple ports, add one task per port

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.