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.
Scanned 9/1/2026
Install to Claude Code
npx -y skills add jimmybish/homelab --skill ufw-firewall-configuration --agent claude-codeInstalls 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 automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/jimmybish-ufw-firewall-configuration)More formats (shields.io, HTML) on the badges page.
---
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
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.