/ops-infrastructure:nftables-allow-sourcefrom ops-infrastructure
Adds a source IP or CIDR to nftables using live insertion into the input chain first, then persists to config. Useful for firewall management and whitelisting inbound traffic.
Ships in ops-infrastructure. 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.
Use this skill to add a source IP or CIDR to nftables using the method that worked in this repo session:
input chain with nft -ainput chain/etc/nftables.conf in the input chainDo not use a config-first workflow here. The working method is live input insertion first, persistence second.
Use this skill when the task mentions any of the following:
nft -a handlesAccept input as:
HOST SOURCE [MODE]
Mode:
plan: produce the command sequence onlyexecute (default): inspect, insert, and verify the live ruleExamples:
$nftables-allow-source bastion 203.0.113.42 execute$nftables-allow-source 198.51.100.25 203.0.113.42/32 plan$nftables-allow-source edge-firewall 198.51.100.0/24 executenft is installed and the host is actually using nftables.input chain before any persistent edit.input chain with handles.sudo nft -a list chain inet filter input
Use this to:
input chain.Preferred live insertion pattern:
sudo nft insert rule inet filter input position 0 ip saddr <SOURCE> accept
This is the working method and should be preferred over editing /etc/nftables.conf first.
input chain immediately.sudo nft -a list chain inet filter input
Success means the new ip saddr <SOURCE> accept rule appears at the top of the input chain before the rest of the policy logic.
/etc/nftables.conf.ip saddr <SOURCE> accept comment "Authorized External IP" immediately after:
type filter hook input priority filter; policy drop;input chain specifically/etc/nftables.conf is empty or corrupted, restore from the latest backup before editingsudo nft -f /etc/nftables.confsudo sed -n '/chain input {/,/}/p' /etc/nftables.confsudo nft -a list chain inet filter inputinput chainsudo nft -a list chain inet filter input
sudo nft insert rule inet filter input position 0 ip saddr 203.0.113.42 accept
sudo cp /etc/nftables.conf /etc/nftables.conf.bak-$(date +%Y%m%d%H%M%S)
sudo sed -i '/type filter hook input priority filter; policy drop;/a\ ip saddr 203.0.113.42 accept comment "Authorized External IP"' /etc/nftables.conf
sudo nft -f /etc/nftables.conf
sudo sed -n '/chain input {/,/}/p' /etc/nftables.conf
sudo nft -a list chain inet filter input
Do not use these approaches as the default workflow for this skill:
/etc/nftables.conf first and assuming reload will be safeinput chainmanagement chain when the operator wants a host-wide source exception/etc/nftables.confRequire explicit operator confirmation before:
0.0.0.0/0Before requesting approval, include:
For each run, include:
inet filter inputinput-chain config snippet after editIf a service is still unreachable after the source allow rule is added:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub specterops/skills --plugin ops-infrastructure4 skills in this plugin
/iac-attack-surfaceHunt for exploitable infrastructure-as-code misconfigurations from an offensive security perspective. Use for Terraform, Docker, Compose, Kubernetes, Ansible, and cloud-init/user-data reviews focused on exposed services, privilege paths, secrets, unsafe defaults, workload escape, lateral movement, persistence, and assessment-ready findings./proxychains-tunnelRun in-scope network commands through a SOCKS5 tunnel with proxychains4, including tunnel readiness checks and evidence capture. Use when traffic must traverse a local SOCKS proxy (for example pivoting through SSH dynamic forwarding)./ssh-opsEstablish and operate scoped SSH sessions for authorized remote command execution with full evidence capture. Use when the operator provides SSH-accessible targets/credentials and Codex must execute commands on a remote host as an interactive user while enforcing OPSEC gating and safe-check behavior.Other plugins' skills for the same job