| Crates.io | sentinel-agent-denylist |
| lib.rs | sentinel-agent-denylist |
| version | 0.1.0 |
| created_at | 2025-12-25 12:33:13.479259+00 |
| updated_at | 2025-12-25 12:33:13.479259+00 |
| description | Denylist agent for Sentinel reverse proxy - IP and pattern-based blocking |
| homepage | https://sentinel.raskell.io |
| repository | https://github.com/raskell-io/sentinel-agent-denylist |
| max_upload_size | |
| id | 2004515 |
| size | 74,525 |
IP and pattern-based blocking agent for Sentinel reverse proxy.
cargo install sentinel-agent-denylist
git clone https://github.com/raskell-io/sentinel-agent-denylist
cd sentinel-agent-denylist
cargo build --release
sentinel-denylist-agent --socket /var/run/sentinel/denylist.sock \
--block-ips "192.168.1.100,10.0.0.1" \
--block-paths "/admin,/wp-admin" \
--block-user-agents "bot,scanner"
| Option | Environment Variable | Description | Default |
|---|---|---|---|
--socket |
AGENT_SOCKET |
Unix socket path | /tmp/sentinel-denylist.sock |
--block-ips |
- | Comma-separated IPs to block | - |
--block-paths |
- | Comma-separated path prefixes to block | - |
--block-user-agents |
- | Comma-separated User-Agent patterns to block | - |
--verbose |
RUST_LOG |
Enable verbose logging | false |
Add to your Sentinel config.kdl:
agents {
agent "denylist" {
type "custom"
transport "unix_socket" {
path "/var/run/sentinel/denylist.sock"
}
events ["request_headers"]
timeout-ms 10
failure-mode "open"
}
}
routes {
route "all" {
matches { path-prefix "/" }
upstream "backend"
agents ["denylist"]
}
}
When a request is blocked, the agent returns:
sentinel-denylist-agent \
--block-ips "1.2.3.4,5.6.7.8,192.168.0.0/24"
sentinel-denylist-agent \
--block-paths "/admin,/wp-admin,/.env,/.git"
sentinel-denylist-agent \
--block-user-agents "sqlmap,nikto,nessus,acunetix"
# Run with debug logging
RUST_LOG=debug cargo run -- --socket /tmp/test.sock --block-ips "127.0.0.1"
# Run tests
cargo test
MIT OR Apache-2.0