返回列表 发布新帖
查看: 85|回复: 0

VibeCoding 了个 无需后台服务的 Windows 极简防火墙 netblock

ad174655发表于 2026-5-26 14:59:04 来自手机版 | 查看全部 |阅读模式
特性介绍

AI 友好的命令行接口
直接使用 Windows 底层接口,无需后台服务
不依赖 windows 防火墙,即使防火墙是关的也能生效

使用方法

C:\Windows\System32>netblock.exe -h

netblock <command> [options]

Commands:
  add    Add a blocking/filtering rule
  del    Delete rule(s)
  list   List all rules managed by netblock

Options for 'add':
  -n <name>         Rule name (for later management; default: auto-generated UUID)
  -p <path>         Program absolute path (include .exe; default: all programs)
  -a <ip/cidr>      Remote IP address (IPv4/IPv6, e.g. 192.168.1.1 or 2001:db8::/32)
  -l <port|range>   Local port (e.g. 80; 8000-9000; 81,82,83; 81,82-85; default: all)
  -r <port|range>   Remote port (same format as -l; default: all)
  -e <block|allow>  Action (default: block)
  -d <in|out|both>  Traffic direction (default: both)
  -t                Set as temporary rule (default: persistent)

Options for 'del':
  -n <name>         Delete by rule name (recommended)
  -p <path>         Delete all rules matching this program path (batch)

Note: 'add' requires at least one filter condition (-p, -a, -l, or -r).
回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表