configuring-firewalls

Configure host-based and cloud firewalls with practical rules for servers, databases, and networks.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/maser-media --skill configuring-firewalls-masermediagroup-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: configuring-firewalls
Source: https://github.com/masermediagroup-stack/maser-media/tree/main/.cursor/skills/community/ai-design-components/skills/configuring-firewalls
Command: npx skills add https://github.com/masermediagroup-stack/maser-media --skill configuring-firewalls-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up firewalls correctly is error-prone: a single misconfigured rule can lock you out of a server via SSH or expose sensitive services like databases to the public internet. This Skill provides tested rule patterns and safety checklists for host-based firewalls (UFW, nftables, iptables), cloud security groups (AWS, GCP, Azure), and Kubernetes NetworkPolicies. ## Core Features & Use Cases - Tool Selection Guidance: A decision framework helps you choose between UFW, nftables, iptables, firewalld, Security Groups, NACLs, and NetworkPolicies based on your platform and requirements. - Ready-to-Apply Rule Patterns: Copy-paste configurations for common scenarios including web servers, private databases, bastion hosts, DMZ architectures, and egress filtering. - Safety-First Workflow: Built-in checklists prevent lockouts by enforcing SSH access rules before enabling firewalls, plus troubleshooting guides for connectivity issues. - Use Case: You are deploying a three-tier web application on AWS and need Security Groups for the web, app, and database tiers, plus UFW rules on each host for defense-in-depth. This Skill provides the Terraform modules and host firewall configs for the entire architecture. ## Quick Start Ask the AI to configure a firewall for an Ubuntu web server that allows HTTP and HTTPS from anywhere but restricts SSH to your office IP address.

Frequently Asked Questions about configuring-firewalls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a firewall on an Ubuntu server?▼

Use UFW on Ubuntu: set default deny incoming, allow outgoing, then explicitly allow SSH before enabling with 'sudo ufw allow ssh' and 'sudo ufw enable'. Add service rules like 'sudo ufw allow https' and verify with 'sudo ufw status verbose'.

What is the difference between AWS Security Groups and Network ACLs?▼

Security Groups are stateful, instance-level firewalls that only support allow rules and automatically permit return traffic. Network ACLs are stateless, subnet-level controls supporting both allow and deny rules, evaluated sequentially, and require explicit ephemeral port rules (1024-65535) for return traffic.

Should I use nftables or iptables for Linux firewall rules?▼

Use nftables on modern kernels (4.14+) for better O(log n) performance and unified IPv4/IPv6/NAT syntax. Use iptables only on legacy systems with older kernels, and plan migration to nftables when feasible.

How do I avoid locking myself out when enabling a firewall?▼

Always add an SSH allow rule before enabling the firewall, test rules in a staging environment first, and ensure you have console access (cloud) or physical/IPMI access (on-prem) as a recovery path. Use 'sudo ufw limit ssh' for rate limiting against brute force.

How do I restrict database access to application servers only?▼

Configure the database firewall to allow the database port (e.g., 5432 for PostgreSQL) only from application server IPs or security groups, deny all other inbound traffic, and restrict outbound traffic to the local VPC. Never expose database ports to 0.0.0.0/0.

Why is my Network ACL blocking return traffic in AWS?▼

NACLs are stateless, so return traffic on ephemeral ports must be explicitly allowed. Add inbound and outbound rules permitting TCP ports 1024-65535, and verify rule ordering since NACLs evaluate rules sequentially with first match winning.