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-only
dry_run: trueMitigation is simulated, nothing is announced — safe to experiment.Telemetry
listen.sflowlisten.netflowsampling.default_rateAdvanced— boundary counting, trusted exporters
sampling.boundary_debugsampling.boundaryflow_sourcesNothing yet — using the engine default
Networks & groups
networksprotected_whitelistNothing yet — using the engine default
hostgroupsAdvanced— tenant label
tenantDetection
thresholdsppsmbpsAny trafficFlows per second
Per-protocol limits
ppsmbps
TCP
TCP SYN
UDP
ICMP
Fragments
Empty = disabled. Any crossed limit triggers (OR).
Advanced— outgoing, baseline, carpet, samples
thresholds_outgoingppsmbpsAny trafficFlows per second
Per-protocol limits
ppsmbps
TCP
TCP SYN
UDP
ICMP
Fragments
Empty = disabled. Any crossed limit triggers (OR).
Baseline (learned thresholds)
baseline.enabledCarpet detection
carpetAttack samples
samplesMitigation
Mitigation method
mitigationBGP
bgp.local_asnbgp.router_idbgp.next_hopbgp.next_hop6bgp.communitybgp.neighborsbgp.neighbors[0]10.0.0.254Advanced— Graceful Restart, escalation, BGP extras
bgp.communitiesbgp.listen_portbgp.local_prefbgp.graceful_restart.enabledbgp.graceful_restart.restart_secondsbgp.graceful_restart.long_livedbgp.graceful_restart.long_lived_stale_secondsEscalation ladder
escalationBans
ban.ttl_seconds≈ 10 min
ban.unban_hysteresis_seconds≈ 2 min
ban.max_active_bansAdvanced— fallback, storm guards, persistence
ban.fallbackban.max_banned_fractionban.max_bans_per_windowban.ban_window_secondsban.state_fileNotifications
Telegram
notify.telegram.token_envnotify.telegram.chat_idnotify.webhook.urlnotify.slack.webhook_urlAdvanced— email, exec hook, update check
notify.email.smtp_hostnotify.email.fromnotify.email.tonotify.email.username_envnotify.email.password_envnotify.email.require_tlsExec hook
notify.exec.commandnotify.exec.formatnotify.exec.timeout_secondsUpdates
update_check.enabledAPI & misc
api.listenapi.dashboardapi.token_envapi.tokensAdvanced— tokens, ClickHouse, GeoIP
ClickHouse history
storage.clickhouse.urlGeoIP
geoip.enabledconfig.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. Save the file
sudo install -m 0644 config.yaml /etc/kapkan/config.yaml2. Validate with the engine binary
kapkan -check-config /etc/kapkan/config.yaml3. Reload the service
sudo systemctl reload kapkan4. Watch-only: let it observe for about a week (logs + /api/v1/attacks), then set dry_run: false
journalctl -u kapkan -f