<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Implementing Endpoint Network Segmentation

## Commands

| Command | Description |
|---|---|
| `Get-NetFirewallRule` | List Windows Firewall rules |
| `New-NetFirewallRule` | Create a new Windows Firewall rule |
| `iptables -L -n -v` | List Linux iptables rules |
| `pfctl -sr` | Show active pf rules on macOS/BSD |
| `Get-NetTCPConnection` | List active TCP connections |
| `ss -tunap` | List active connections on Linux |
| `Get-NetFirewallProfile` | Check Windows Firewall profile status |

## Agent Script

```bash
# node agent.js map-flows --hostname <value>
# node agent.js check-policy --hostname <value>
# node agent.js generate-rules --role <value>
```
