Files
BanForge/docs/cli.md
d3m0k1d e907fb0b1a
All checks were successful
build / build (push) Successful in 3m13s
feat: update ban/unban command
2026-01-25 21:13:56 +03:00

1.6 KiB

CLI commands BanForge

BanForge provides a command-line interface (CLI) to manage IP blocking, configure detection rules, and control the daemon process.

Commands

init - create a deps file

banforge init

Description This command creates the necessary directories and base configuration files required for the daemon to operate.

daemon - Starts the BanForge daemon process

banforge daemon

Description This command starts the BanForge daemon process in the background. The daemon continuously monitors incoming requests, detects anomalies, and applies firewall rules in real-time.

firewall - Manages firewall rules

banforge ban <ip>
banforge unban <ip>

Description These commands provide an abstraction over your firewall. If you want to simplify the interface to your firewall, you can use these commands.

Flag -t or -ttl add bantime if not used default ban 1 year

list - Lists the IP addresses that are currently blocked

banforge list

Description This command output table of IP addresses that are currently blocked

rule - Manages detection rules

banforge rule add -n rule.name -c 403
banforge rule list 

Description These command help you to create and manage detection rules in CLI interface.

Flag Required
-n -name +
-s -service +
-p -path -
-m -method -
-c -status -
-t -ttl -(if not used default ban 1 year)

You must specify at least 1 of the optional flags to create a rule.