Skip to main content
Glama

security_iptables_check

Read-only

iptables firewall audit — Audit an iptables-save ruleset offline (text=, optional ipv6= with ip6tables-save). Finds default-allow INPUT/FORWARD policies, catch-all ACCEPT rules, unreachable rules after a catch-all, databases/Redis/Docker API/etcd/kubelet/RDP/SMB/VNC and 35+ risky ports open to the internet, SSH without rate limiting, all-port accepts, missing loopback / ESTABLISHED rules, no logging, ICMP fully blocked, Docker-published ports bypassing INPUT and IPv6 left open while IPv4 is locked down. Follows user chains (ufw etc.). Returns PASS / REVIEW / FIX BEFORE DEPLOY / BLOCK, score and grade, exposed ports, findings with fixes and a hardened example ruleset. Example: /v1/security/iptables-check?text=-A INPUT -p tcp --dport 6379 -j ACCEPT (send full iptables-save output, one rule per line) Price: $0.006 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "security_iptables_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes-A INPUT -p tcp --dport 6379 -j ACCEPT

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description goes well beyond that: it discloses that analysis is offline (no scanning of the caller's host), the exact return shape (PASS / REVIEW / FIX BEFORE DEPLOY / BLOCK plus score, grade, exposed ports, findings with fixes, and a hardened example ruleset), and the cost/transport ($0.006 USDC on Base via x402). That is unusually rich behavioral context for a read-only checker with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and offline mode are front-loaded, the return contract and price are placed after the detection list, and the example is last — a sensible order. The middle section is a long run-on enumeration of checked conditions that could be tightened, but nearly every clause conveys a distinct detection capability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-input tool with no output schema, the description covers what is needed: input format, processing mode, and a full account of the response including the verdict tiers and hardened example output. The only completeness defect is the phantom ipv6 parameter, which leaves the agent unsure whether an IPv6 ruleset can be submitted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With a single parameter and 100% schema description coverage, the baseline is 3, and the description does add real format meaning ('send full iptables-save output, one rule per line'). However it also references an 'optional ipv6=' parameter that does not exist in the input schema, which is actively misleading about the accepted argument set.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource — 'Audit an iptables-save ruleset offline' — and then enumerates the exact classes of misconfiguration it detects (default-allow policies, catch-all ACCEPTs, Docker-published bypasses, IPv6 drift, etc.). That specificity makes it trivially distinguishable from sibling file-config audits like security_sshd_check or security_dockerfile_check.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the operating mode ('offline', text-based, follows user chains such as ufw) and gives a concrete invocation pattern with an example query string, plus an instruction to send the full iptables-save output one rule per line. It stops short of explicit routing guidance — it never says when to prefer security_sshd_check or security_dockerfile_check instead, or what to do if only a single rule is available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources