firewall-config

firewall-config is a skill for Claude Code, Codex from BagelHole/DevOps-Security-Agent-Skills. It costs 34 tokens per session (3,335 once invoked), scanned A, original, MIT.

A guide for configuring host and cloud firewalls, which control which network connections are allowed or blocked.

In plain words
What is it for?
Use it to manage iptables or nftables rules, configure AWS, GCP, or Azure security groups, restrict ports, and create network segments.
Why use it?
It helps prevent unwanted access and separates application, database, and other infrastructure network zones.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to manage iptables or nftables rules, configure AWS, GCP, or Azure security groups, restrict ports, and create network segments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bagelhole/devops-security-agent-skills/firewall-config
About the project

DevOps & Security Agent Skills is a knowledge base of agent-readable skills covering software delivery, cloud infrastructure, security, compliance, AI operations, and incident response. It is for SRE, platform, infrastructure, and security teams using agents to work with systems such as Kubernetes, Terraform, and major cloud platforms. The catalogue provides a selection of the project's skills for agents including Claude Code, Cursor, and Codex.

BagelHole/DevOps-Security-Agent-Skills · 1,229 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill firewall-config
Clone the repo
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for firewall-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/firewall-config/github.svg)](https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/firewall-config)
Your own site
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/firewall-config"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/firewall-config/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for firewall-config

Your own site · 80×15
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/firewall-config"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/firewall-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,335 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 26
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.03335
Opus 5.5 $0.00014 $0.01334
Sonnet 5.5 $0.00007 $0.00667
Haiku 4.5 $0.00003 $0.00333

Measured 2mo ago against content hash 707aedfc1967, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

firewall-config scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/iptables-rules.sh, scripts/firewall-audit.sh, scripts/setup-ufw.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Root or sudo access on Linux hosts

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

security/network/firewall-config/SKILL.md · 454 lines

How it starts

The opening of the file, as written. The whole thing — 454 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Firewall Configuration

Configure host-based and cloud firewalls for network security.

When to Use This Skill

Use this skill when:

  • Setting up a new server and need to restrict network access
  • Implementing network segmentation between application tiers
  • Configuring cloud security groups for AWS, GCP, or Azure resources
  • Migrating from iptables to nftables
  • Auditing existing firewall rules for compliance
  • Responding to a security incident requiring emergency network blocks

Prerequisites

  • Root or sudo access on Linux hosts
  • AWS CLI configured for cloud security groups
  • Understanding of TCP/IP, ports, and protocols
  • Network diagram showing required traffic flows

iptables

Basic Setup with Default Deny

# Flush existing rules
iptables -F
iptables -X
iptables -t nat -F
iptables -t mangle -F

# Default policies - deny all inbound, allow outbound
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# Allow established connections
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

# Allow loopback
iptables -A INPUT -i lo -j ACCEPT

# Drop invalid packets
iptables -A INPUT -m conntrack --ctstate INVALID -j DROP

# Allow SSH (restrict to management subnet)
iptables -A INPUT -p tcp --dport 22 -s 10.0.100.0/24 -j ACCEPT

# Allow HTTP/HTTPS from anywhere
iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT

# Allow ICMP (ping) with rate limiting
iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s --limit-burst 4 -j ACCEPT

# Log dropped packets (rate limited to avoid log flooding)
iptables -A INPUT -m limit --limit 5/min -j LOG --log-prefix "IPTABLES-DROP: " --log-level 4

# Save rules (Debian/Ubuntu)
iptables-save > /etc/iptables/rules.v4
ip6tables-save > /etc/iptables/rules.v6

Anti-DDoS Rules

# SYN flood protection
iptables -A INPUT -p tcp --syn -m limit --limit 25/s --limit-burst 50 -j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP

# Limit new connections per source IP
iptables -A INPUT -p tcp --dport 80 -m connlimit --connlimit-above 50 -j REJECT

# Block port scanning (detect TCP flags abuse)
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
iptables -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j DROP
iptables -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP

Read the full file on GitHub · 454 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 454 lines · 34 tokens per session scan A 707aedfc1967

Subscribe to this mod's changes

firewall-config is a skill published in the GitHub repository BagelHole/DevOps-Security-Agent-Skills (1,229 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 3,335 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

firewall-config compared with skills from other repositories

firewall-config next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
firewall-configBagelHole/DevOps-Security-Agent-SkillsSkill1.2k6mo agoMITA34Claude Code, Codex
implementing-aws-config-rules-for-compliancexalgorix/xalgorixSkill1.5kyesterdayApache-2.0A53Claude Code, Codex
implementing-aws-security-hub-compliancexalgorix/xalgorixSkill1.5kyesterdayApache-2.0A53Claude Code, Codex
ec2itsmostafa/aws-agent-skillsSkill1.2k6d agoMITA320Claude Code
ecsitsmostafa/aws-agent-skillsSkill1.2k6d agoMITA35Claude Code
cloudwatchitsmostafa/aws-agent-skillsSkill1.2k6d agoMITA43Claude Code
cloudformationitsmostafa/aws-agent-skillsSkill1.2k6d agoMITA34Claude Code