Configuration referenceGitHub

Config builder

Assemble a Kapkan configuration on one page — the YAML updates live as you type. Sensible, watch-only-safe defaults are filled in; adjust them to your network.

Runs entirely in your browser. Nothing you enter is sent anywhere.

Watch-onlydry_run: true

Telemetry

listen.sflow
listen.netflow
sampling.default_rate
Advancedboundary counting, trusted exporters
sampling.boundary_debug
sampling.boundary
flow_sources

Nothing yet — using the engine default

Networks & groups

networks
protected_whitelist

Nothing yet — using the engine default

hostgroups
Advancedtenant label
tenant

Detection

thresholds
ppsmbpsAny trafficFlows per second
Per-protocol limits
ppsmbps
TCP
TCP SYN
UDP
ICMP
Fragments

Empty = disabled. Any crossed limit triggers (OR).

Advancedoutgoing, baseline, carpet, samples
thresholds_outgoing
ppsmbpsAny trafficFlows per second
Per-protocol limits
ppsmbps
TCP
TCP SYN
UDP
ICMP
Fragments

Empty = disabled. Any crossed limit triggers (OR).

Baseline (learned thresholds)

baseline.enabled

Carpet detection

carpet

Attack samples

samples

Mitigation

Mitigation method

mitigation

BGP

bgp.local_asn
bgp.router_id
bgp.next_hop
bgp.next_hop6
bgp.community
bgp.neighbors
bgp.neighbors[0]10.0.0.254
AdvancedGraceful Restart, escalation, BGP extras
bgp.communities
bgp.listen_port
bgp.local_pref
bgp.graceful_restart.enabled
bgp.graceful_restart.restart_seconds
bgp.graceful_restart.long_lived
bgp.graceful_restart.long_lived_stale_seconds

Escalation ladder

escalation

Bans

ban.ttl_seconds
≈ 10 min
ban.unban_hysteresis_seconds
≈ 2 min
ban.max_active_bans
Advancedfallback, storm guards, persistence
ban.fallback
ban.max_banned_fraction
ban.max_bans_per_window
ban.ban_window_seconds
ban.state_file

Notifications

Telegram

notify.telegram.token_env
notify.telegram.chat_id
notify.webhook.url
notify.slack.webhook_url
Advancedemail, exec hook, update check

Email

notify.email.smtp_host
notify.email.from
notify.email.to
notify.email.username_env
notify.email.password_env
notify.email.require_tls

Exec hook

notify.exec.command
notify.exec.format
notify.exec.timeout_seconds

Updates

update_check.enabled

API & misc

api.listen
api.dashboard
api.token_env
api.tokens
Advancedtokens, ClickHouse, GeoIP

ClickHouse history

storage.clickhouse.url

GeoIP

geoip.enabled
config.yaml

Engine check running…

# Kapkan config — generated by the kapkan.io builder.# Check first:  kapkan -check-config config.yaml dry_run: true  # simulated, never announced listen:  sflow: ":6343"  netflow: ":2055"  # NetFlow v5/v9 + IPFIX sampling:  default_rate: 1000  # when the exporter omits it networks:  # detection scope  - "203.0.113.0/24" thresholds:  # per host, unsampled units  pps: 80000  mbps: 1000  flows_per_sec: 35000 ban:  ttl_seconds: 600  # auto-withdraw after this  unban_hysteresis_seconds: 120  # anti-flap before unban  max_active_bans: 50 bgp:  local_asn: 65001  router_id: "10.0.0.1"  # IPv4 dotted-quad  next_hop: "192.0.2.1"  # blackhole next-hop  community: "65000:666"  # RTBH community  neighbors:    - address: "10.0.0.254"      remote_asn: 65000 api:  listen: "127.0.0.1:8080"  # localhost needs no auth# token_env: "KAPKAN_API_TOKEN"  # required off localhost 
Apply on the host
  1. 1. Save the file

    sudo install -m 0644 config.yaml /etc/kapkan/config.yaml
  2. 2. Validate with the engine binary

    kapkan -check-config /etc/kapkan/config.yaml
  3. 3. Reload the service

    sudo systemctl reload kapkan
  4. 4. Watch-only: let it observe for about a week (logs + /api/v1/attacks), then set dry_run: false

    journalctl -u kapkan -f