/secure-server-skills:firewall-configurationfrom secure-server-skills
Audits and configures UFW on Ubuntu/Debian with source-restricted rules, IPv4/IPv6 checks, and safe rollback. Useful for securing network exposure.
Ships in secure-server-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Configure only the required network paths. Existing active policies and rules must be understood before changing defaults; an allowed SSH rule does not demonstrate that a fresh connection works.
ss -ltnup, effective SSH ports, ssh.socket where present, ufw status verbose, ufw show added, provider security groups and any container-published ports.sshd_config alone./etc/default/ufw IPv6 handling. Include relevant external IPv6 tests; IPv4 filtering cannot establish IPv6 isolation.Read references/ufw-rules.md for source-restricted rules, routing, Docker and recovery.
Install UFW/iproute2 first if the authorized setup requires them. Preview scripts/setup-firewall.sh:
sudo bash scripts/setup-firewall.sh --ssh-source 203.0.113.10/32 --allow-port 443/tcp --dry-run
For socket/custom listeners, pass each actual port with --ssh-port. Repeat --ssh-source for authorized sources, including IPv6. --public-ssh explicitly chooses access from any source; do not infer that choice from missing information.
Once the rule set and activation are authorized:
sudo bash scripts/setup-firewall.sh --ssh-source 203.0.113.10/32 --allow-port 443/tcp --apply --enable
The helper validates ports/sources/listeners and checks the current SSH client against the proposed source CIDRs before changing rules. If that client is excluded, or its address is unavailable when enabling inactive UFW, it refuses the operation unless --console-recovery-confirmed explicitly attests tested out-of-band recovery. Preserve SSH_CONNECTION through privilege escalation where appropriate; never add the override merely to bypass a failed access check. It adds management access first and snapshots UFW configuration for rollback. It stages deny-incoming/allow-outgoing defaults only on inactive UFW. Existing active defaults and rules are preserved; review unwanted broad allows separately. Without --enable, an inactive firewall remains inactive. Public service flags deliberately allow any source; use manual source-restricted rules for internal databases/services.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/auto-updatesAudit or configure unattended upgrades on Ubuntu/Debian. Use for security-update scheduling, allowed origins and reboot policy./backup-strategyDesign and verify Linux backups and recovery. Use for file/database jobs, encryption, retention, S3 transfer and restore tests./fail2ban-setupAudit or configure Fail2ban SSH jails on Ubuntu/Debian. Use for log backends, filter behavior and ban enforcement./ssh-hardeningAudit or harden OpenSSH on Ubuntu/Debian with verified key access. Use when changing authentication or administrative SSH access.npx claudepluginhub mikr13/secure-server-setup-skills --plugin secure-server-skills