微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🛡️

macOS 防火墙命令行中枢

little-snitch · v1.0.1
开发 安全 B 级 作者 gumadeiras 公开目录收录
2.7k 下载 2 安装 6.3k 收藏 12 浏览

简介

macOS 专业级防火墙命令行控制,支持实时流量监控、规则组管理和配置备份,需 root 权限谨慎使用。

原始描述

Control Little Snitch firewall on macOS. View logs, manage profiles and rule groups, monitor network traffic. Use when the user wants to check firewall activity, enable/disable profiles or blocklists, or troubleshoot network connections.

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/little-snitch/
其它 Agent解压到它自己的 skills 目录,目录名用 little-snitch

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

技能正文


name: little-snitch description: Control Little Snitch firewall on macOS. View logs, manage profiles and rule groups, monitor network traffic. Use when the user wants to check firewall activity, enable/disable profiles or blocklists, or troubleshoot network connections.

Little Snitch CLI

Control Little Snitch network monitor/firewall on macOS.

Setup

Enable CLI access in Little Snitch → Preferences → Security → Allow access via Terminal

Once enabled, the littlesnitch command is available in Terminal.

⚠️ Security Warning: The littlesnitch command is very powerful and can potentially be misused by malware. When access is enabled, you must take precautions that untrusted processes cannot gain root privileges.

Reference: https://help.obdev.at/littlesnitch5/adv-commandline

Commands

Command Root? Description
--version No Show version
restrictions No Show license status
log No Read log messages
profile Yes Activate/deactivate profiles
rulegroup Yes Enable/disable rule groups & blocklists
log-traffic Yes Print traffic log data
list-preferences Yes List all preferences
read-preference Yes Read a preference value
write-preference Yes Write a preference value
export-model Yes Export data model (backup)
restore-model Yes Restore from backup
capture-traffic Yes Capture process traffic

Examples

View Recent Logs (no root)

littlesnitch log --last 10m --json

Stream Live Logs (no root)

littlesnitch log --stream

Check License Status (no root)

littlesnitch restrictions

Activate Profile (requires root)

sudo littlesnitch profile --activate "Silent Mode"

Deactivate All Profiles (requires root)

sudo littlesnitch profile --deactivate-all

Enable/Disable Rule Group (requires root)

sudo littlesnitch rulegroup --enable "My Rules"
sudo littlesnitch rulegroup --disable "Blocklist"

View Traffic History (requires root)

sudo littlesnitch log-traffic --begin-date "2026-01-25 00:00:00"

Stream Live Traffic (requires root)

sudo littlesnitch log-traffic --stream

Backup Configuration (requires root)

sudo littlesnitch export-model > backup.json

Log Options

Option Description
--last <time>[m|h|d] Show entries from last N minutes/hours/days
--stream Live stream messages
--json Output as JSON
--predicate <string> Filter with predicate

Notes

  • macOS only
  • Many commands require sudo (root access)
  • Profiles: predefined rule sets (e.g., "Silent Mode", "Alert Mode")
  • Rule groups: custom rule collections and blocklists

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

macosfirewallnetwork-securityclitraffic-monitoringroot-requiredprivacy

同类 Skill