Skip to content

About

The threat blocking agent you can set up in five minutes and actually understand.

Resources

Stars

23 stars

Watchers

1 watching

Forks

Repository files navigation

BREACH::HARBOR

The threat blocking agent you can set up in five minutes and actually understand.

Report Bug · Request Feature · Website · Discord

curl -fsSL https://breachharbor.com/install.sh | sh

Dashboard screenshot


💖 Enjoying Breach Harbor?

Help keep it free and actively developed by buying me a coffee ☕, becoming a sponsor, or supporting on Patreon. If you're running this at a company, a business license funds the project too (see Pricing on the website). Every contribution helps keep the build machines running and the blocklist honest.


What it is

One static binary, two modes:

breachharbor agent     # watches one machine and blocks attackers
breachharbor server    # aggregates signal from many agents, publishes blocklists

The agent auto-detects your logs (sshd, nginx, fail2ban), watches quietly for 24 hours by default, and blocks nothing until you tell it to. Everything it blocks lives in one dedicated firewall table, so breachharbor agent flush undoes all of it, instantly, any time. No server required: the agent is a complete product on its own.

Quick start

curl -fsSL https://breachharbor.com/install.sh | sh
breachharbor doctor

That downloads the right prebuilt binary for your OS/arch (linux/amd64, linux/arm64, darwin/arm64, openbsd/amd64), verifies its checksum, and installs it to /usr/local/bin. No release built for your platform yet? Build from source instead (requires Go 1.24+):

git clone https://github.com/Dyneteq/Breach-Harbor.git
cd Breach-Harbor
make build
./bin/breachharbor doctor

doctor tells you what's ready to go and what isn't; it never needs root.

breachharbor agent flush          # always safe: reports what would be removed
sudo breachharbor agent flush --yes    # actually removes it

Run as a daemon

sudo breachharbor agent install     # systemd (Linux) or launchd (macOS)
sudo breachharbor server install --listen :8080

Installs a service that starts at boot and restarts on crash: a systemd unit on Linux (sudo systemctl status breachharbor-agent), a LaunchDaemon on macOS (sudo launchctl list | grep breachharbor, logs at <data-dir>/agent.log). The agent comes up in dry run by default; add --enforce to start enforcing immediately. breachharbor agent uninstall removes the service and flushes every firewall rule it added.

Updating

breachharbor update           # installs the latest release over the running binary
breachharbor update --check   # just report whether a newer release exists

Re-run with sudo if the binary lives in a root-owned directory (the default /usr/local/bin install does). Updates both breachharbor and bh when both are present.

Status

Being rebuilt into the CLI above, one milestone at a time:

  • ✅ M0: it builds. version, doctor, agent flush work today.
  • ✅ M1: the agent stands alone. agent run/status/top/enforce/sources/install/uninstall all work.
  • ✅ M2: the server is useful. server run/install/status and agent enroll work; agents can publish to a server and pull its blocklist.
  • ⏳ M3: trust hardening and M4: sharing. Sketched, not started.

Development

make build       # bin/breachharbor + bin/bh
make test
make vet
make fmt-check

CI runs all of these plus a cross-compile check for linux/amd64, linux/arm64, darwin/arm64, openbsd/amd64.

Docker

docker build -t breachharbor .
docker compose up

Static binary, no CGO, ~8MB image. Healthcheck is just breachharbor doctor --json.

Security notes

  • Nothing leaves the machine unless you run breachharbor agent enroll <url>; doctor shows exactly what would be sent and where.
  • No AI/ML. Detection is plain rules plus free public threat feeds (Spamhaus, FireHOL, Tor exit nodes).

Contributing

PRs welcome: fork, branch, and open a pull request. Add tests: this runs as root and edits firewalls, so untested code doesn't ship.

Attribution

IP geolocation/ASN enrichment is powered by one of these, whichever database you install into ./data (see scripts/download-geoip.sh and scripts/download-geoip-dbip.sh):

License

GPL-3.0

Support

GitHub Issues

Join the Breach Harbor community:

Discord

🌟 Please check my other projects!

  • tududi - Self-hosted task and project management app
  • Reconya - Network reconnaissance and asset discovery tool

About

The threat blocking agent you can set up in five minutes and actually understand.

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages