administering-linux
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying…
Configure host-based firewalls (iptables, nftables, UFW) and cloud security groups (AWS, GCP, Azure) with practical rules for common scenarios like web servers, databases, and bastion hosts. Use when exposing services, hardening servers, or implementing network segmentation with
$ npx -y skills add ancoleman/ai-design-components --skill configuring-firewalls --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/configuring-firewallsContext preview
The summary Claude sees to decide when to auto-load this skill.
Configure host-based firewalls (iptables, nftables, UFW) and cloud security groups (AWS, GCP, Azure) with practical rules for common scenarios like web servers, databases, and bastion hosts. Use when exposing services, hardening servers, or implementing network segmentation with
name: configuring-firewalls description: Configure host-based firewalls (iptables, nftables, UFW) and cloud security groups (AWS, GCP, Azure) with practical rules for common scenarios like web servers, databases, and bastion hosts. Use when exposing services, hardening servers, or implementing network segmentation with defense-in-depth strategies.
Guide engineers through configuring firewalls across host-based (iptables, nftables, UFW), cloud-based (AWS Security Groups, NACLs), and container-based (Kubernetes NetworkPolicies) environments with practical rule examples and safety patterns to prevent lockouts and security misconfigurations.
**Trigger Phrases:**
**Common Scenarios:**
**AWS:**
**GCP:**
**Azure:**
**Ubuntu/Debian + Simplicity:**
**RHEL/CentOS/Fedora:**
**Modern Distro + Advanced Control:**
**Legacy Systems:**
**Stateful (recommended for most cases):**
**Stateless (specialized use):**
# 1. Set defaults sudo ufw default deny incoming sudo ufw default allow outgoing # 2. CRITICAL: Allow SSH before enabling (prevent lockout) sudo ufw allow ssh sudo ufw limit ssh # Rate-limit to prevent brute force # 3. Allow web traffic sudo ufw allow http # Port 80 sudo ufw allow https # Port 443 # 4. Allow from specific IP (e.g., database access) sudo ufw allow from 192.168.1.100 to any port 5432 # 5. Enable firewall sudo ufw enable # 6. Verify rules sudo ufw status verbose
For complete UFW patterns, see references/ufw-patterns.md
#!/usr/sbin/nft -f
# /etc/nftables.conf
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
# Accept loopback
iif "lo" accept
# Accept established connections (stateful)
ct state established,related accept
# Drop invalid packets
ct state invalid drop
# Allow SSH
tcp dport 22 accept
# Allow HTTP/HTTPS
tcp dport { 80, 443 } accept
# Log dropped packets
log prefix "nftables-drop: " drop
}
chain forward {
type filter hook forward priority 0; policy drop;
}
chain output {
type filter hook output priority 0; policy accept;
}
}Apply: `sudo nft -f /etc/nftables.conf` Enable on boot: `sudo systemctl enable nftables`
For advanced patterns (sets, maps), see references/nftables-patterns.md
# Web server security group
resource "aws_security_group" "web" {
name = "web-server-sg"
description = "Security group for web servers"
vpc_id = aws_vpc.main.id
# Allow HTTP/HTTPS from anywhere
ingress {
description = "HTTPS from anywhere"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
# Allow SSH from bastion only
ingress {
description = "SSH from bastion"
from_port = 22
to_port = 22
protocol = "tcp"
security_groups = [aws_security_group.bastion.id]
}
# Allow all outbound
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "web-server-sg"
}
}For Security Groups vs NACLs guide, see references/aws-security-groups.md
Before enabling any firewall:
**Requirements:**
**UFW:**
sudo ufw default deny
Comprehensive UI/UX and Backend component design skills for AI-assisted development with Claude
Repo: ancoleman/ai-design-components
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying…
Data pipelines, feature stores, and embedding generation for AI/ML systems. Use when building RAG pipelines, ML feature serving, or data transformations.…
Strategic guidance for designing modern data platforms, covering storage paradigms (data lake, warehouse, lakehouse), modeling approaches (dimensional,…
Design cloud network architectures with VPC patterns, subnet strategies, zero trust principles, and hybrid connectivity. Use when planning VPC topology,…
Design comprehensive security architectures using defense-in-depth, zero trust principles, threat modeling (STRIDE, PASTA), and control frameworks (NIST CSF,…
Assembles component outputs from AI Design Components skills into unified, production-ready component systems with validated token integration, proper import…