Files
EvoBGP/docs/firewall.md
T
Denozordec 7a3eae98b1
CI / changes (push) Successful in 12s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 25s
CI / web (push) Successful in 46s
CI / go (push) Successful in 1m15s
CI / bird2 (push) Successful in 18s
CI / release (push) Successful in 3m59s
feat(firewall): implement firewall blocklist feature with client management and policy rules
Introduced a comprehensive firewall blocklist feature, allowing for the management of firewall clients and their associated rules. This includes endpoints for enrolling clients, listing clients and rules, and reporting apply statuses. Enhanced the API to support firewall operations, including the ability to handle block/accept policies. Updated the documentation to reflect these changes and added necessary components in the web UI for better user interaction.

Additionally, modified the agent server to support firewall failover and integrated firewall functionality into the existing architecture.
2026-07-08 16:37:27 +07:00

1.6 KiB
Raw Blame History

Firewall blocklist

Подсистема синхронизации blocklist на произвольные Linux-серверы через bash-скрипт и HTTP API.

Авторизация

  1. EnrollPOST /v1/firewall/enroll с заголовком X-EvoBGP-Seed (значение EVOBGP_BUNDLE_SEED_HEX на CP). Клиент генерирует токен evobgp_fw_* локально.
  2. Approve — operator в Web UI (/firewall → Запросы).
  3. SyncGET /v1/firewall/blocklist с Authorization: Bearer <client_token>.

Политика block/accept

  • block — добавить префиксы community в kernel blocklist.
  • accept — не блокировать.
  • Default — accept (пустой blocklist без явных block).

Правила задаются на уровне tenant (по умолчанию) и per-server (overrides клиента). Client scope проверяется раньше tenant-default.

Установка на сервер

curl -fsSL https://<api>/v1/firewall/install.sh | \
  EVOBGP_CP_URL=https://<api> \
  EVOBGP_SEED=<bundle_seed_hex> \
  EVOBGP_CLIENT_NAME="web-01" \
  bash

Файлы: /etc/evobgp/firewall.conf, /usr/local/sbin/evobgp-firewall.sh, systemd timer evobgp-firewall.timer.

Failover через speaker

При EVOBGP_FIREWALL_FAILOVER_ENABLED=1 на speaker-agent CP реплицирует состояние через POST /v1/agent/firewall-replicate. Клиенты используют тот же DNS-домен.

См. также access.md, remote-speakers.md.