Operating

Configuration Reference

Every setting lives in /opt/coredetection/config.ini, organized into sections. Edit the file and restart the service, or change most settings live through the REST API. This page documents every section and key.

Settings are grouped by [section] exactly as they appear in the file. Defaults shown are the shipped values; (empty) means no value, means optional / no default.

Two kinds of logging

CoreDetection keeps two separate, unrelated logs. They are easy to confuse, so here is the distinction:

log_outputs ([general])[attack_log]
PurposeLive operational / console logging for monitoring and troubleshooting.Permanent attack history that powers the reporting API.
Destinationstdout → systemd journal (journalctl -u coredetection).A self-rotating file (attacks.jsonl).
FormatHuman-readable text lines.Structured JSONL (one JSON object per line).
Read by the API?No.Yes — GET /reports/attacks.
RotationManaged by journald.Built-in (max_size_mb / max_backups).
Contentevents (per-attack), totals (per-cycle counts), webhook (queue status).Attack lifecycle events: START / REVIVE / END.

In short: log_outputs controls what you see happening right now, while [attack_log] is the archive of attacks you query later for reports.

General [general]

Core paths and logging behavior.

KeyDescriptionDefault
debug_modeIncrease log verbosity for troubleshooting.true
license_filePath to the license file.license.lic
network_config_filePath to the YAML file listing protected CIDR prefixes.network.yaml
log_outputsWhich log streams to emit: events (per-attack), totals (per-cycle counts), webhook (queue lines).["totals","webhook"]

Flow Data Source [database_settings]

Connection to the time-series database CoreDetection reads enriched flow records from. The flow collector and this database are bundled and installed automatically by the CoreDetection installer — you do not set them up separately. Default values point to the bundled stack on the same server; only change them if you run the database on a different host.

KeyDescriptionDefault
clickhouse_hostDatabase host.localhost
clickhouse_portNative TCP port.9000
clickhouse_userUsername.default
clickhouse_passwordPassword.(empty)
clickhouse_databaseDatabase name.default
connection_timeoutConnection timeout in seconds.30

Timing [timing_settings]

How often detection runs and how much history each cycle analyzes.

KeyDescriptionDefault
detection_window_minutesSliding window of traffic analyzed each cycle.1
check_interval_secondsHow often the detector runs a cycle.60

Detection Thresholds [detection_thresholds]

Severity escalation by bandwidth and packet rate. Tune to your link size (min ≈ 0.5% of link, MEDIUM ≈ 2%, HIGH ≈ 5%, CRITICAL ≈ 20–30%).

KeyDescriptionDefault
min_bandwidth_gbpsMinimum bandwidth to consider traffic an attack (Gbps).0.40
medium_bandwidth_gbpsMEDIUM severity threshold (Gbps).0.60
high_bandwidth_gbpsHIGH severity threshold (Gbps).1.00
critical_bandwidth_gbpsCRITICAL severity threshold (Gbps).2.50
syn_flood_ppsSYN flood packets/sec threshold.50000
ack_flood_ppsACK flood packets/sec threshold.30000
rst_flood_ppsRST flood packets/sec threshold.10000
fin_flood_ppsFIN flood packets/sec threshold.10000
udp_flood_ppsUDP flood packets/sec threshold.50000
icmp_flood_ppsICMP flood packets/sec threshold.15000
high_ppsHard PPS ceiling that forces CRITICAL regardless of bandwidth.50000
min_sources_distributedMinimum unique sources for a distributed attack.80
min_sources_botnetMinimum unique sources for botnet classification.80
min_countries_globalMinimum countries to flag a global attack.3

Display & Query Limits [display_settings]

Limits for query results and console output. Higher values give smart detection more data to analyze.

KeyDescriptionDefault
max_sources_displayTop source IPs kept and shown (improves clustering analysis).100
max_countries_displayTop countries kept and shown.30
max_asns_displayTop ASNs (needed for trusted-ASN detection).50
max_flows_displayFlow samples kept for pattern analysis.50
max_src_ports_displayTop source ports.10
max_dst_ports_displayTop destination ports.10
result_limitMaximum query result rows.1000

Traffic Filters [filters]

Which traffic the detection query evaluates.

KeyDescriptionDefault
dst_net_roleDestination network role to evaluate (required by the query).customers
in_if_boundaryIngress interface boundary filter. Leave blank to disable.external

Advanced Heuristics [advanced_settings]

Fine-grained detection tuning and attack lifecycle behavior.

KeyDescriptionDefault
tcp_conn_ratio_thresholdTCP connection-exhaustion ratio threshold.100
udp_distinct_ports_thresholdUDP distinct-ports threshold for targeted detection.5
icmp_avg_packet_size_thresholdICMP average packet size for fragmentation detection.1400
attack_end_grace_cyclesConsecutive missed cycles before an attack is marked ENDED.8
ended_attack_retention_cyclesKeep ENDED attacks in memory: -1 = forever, 0 = purge now, N = N cycles.-1

API Server [api_settings]

The REST API used to manage and monitor the appliance.

KeyDescriptionDefault
api_enabledEnable the REST API server.true
api_portTCP port the API listens on.9009
api_keySecret key required by all endpoints except /health. Use a long random value.(secret)
api_base_pathBase URL path for all endpoints./CoreDetection/api/v0
api_rate_limitMax requests per minute per IP (0 to disable).100

Attack History Log [attack_log]

Self-rotating JSONL file that powers the built-in /reports API — no database required.

KeyDescriptionDefault
enabledAppend attack lifecycle events (START / REVIVE / END) to the file.true
filePath to the JSONL history file./var/log/coredetection/attacks.jsonl
max_size_mbRotate once the active file exceeds this size in MB (0 = never).50
max_backupsNumber of rotated backups to keep (attacks.jsonl.1 … .N).5

Alerting [alerts]

Local push notifications (Telegram / email) that work without the portal.

KeyDescriptionDefault
enabledMaster switch for push alerts.false
min_severityMinimum severity that triggers an alert: LOW | MEDIUM | HIGH | CRITICAL.HIGH
on_startNotify when an attack starts.true
on_endNotify when an attack ends.true
telegram_enabledEnable the Telegram channel.false
telegram_bot_tokenBot token created via @BotFather.(empty)
telegram_chat_idNumeric chat / channel id to notify.(empty)
email_enabledEnable the email (SMTP) channel.false
smtp_hostSMTP server host.(empty)
smtp_portSMTP server port.587
smtp_usernameSMTP username.(empty)
smtp_passwordSMTP password.(empty)
email_fromFrom address.(empty)
email_toComma-separated list of recipients.(empty)

BGP Mitigation [bgp_settings]

The built-in BGP speaker that announces blackhole / mitigation routes to your routers.

KeyDescriptionDefault
enabledEnable the built-in BGP speaker.true
local_asnLocal autonomous system number.65001
router_idBGP router ID.(server IP)
default_mitigation_nexthopDefault next-hop for mitigation routes.10.10.20.1
announce_critical_attacksAnnounce a route on CRITICAL attacks.true
announce_high_attacksAnnounce a route on HIGH attacks.true
announce_medium_attacksAnnounce a route on MEDIUM attacks.false
announce_low_attacksAnnounce a route on LOW attacks.false
blackhole_communityBGP community attached to blackhole routes.65001:666
mitigation_communityBGP community attached to mitigation routes.65001:100
no_export_communityNO_EXPORT community.65535:65281
neighbor_N_nameFriendly name of static neighbor N (N = 1, 2, …).Core-Router-1
neighbor_N_ipNeighbor IP address.
neighbor_N_asnNeighbor ASN.
neighbor_N_typeSession type: ebgp | ibgp.ebgp
neighbor_N_enabledEnable this neighbor.true
neighbor_N_nexthopPer-neighbor next-hop override.
neighbor_N_multihopeBGP multihop TTL.255
neighbor_N_passwordOptional MD5/TCP session password.
default_holdtimeBGP hold timer (seconds).180
default_keepaliveBGP keepalive timer (seconds).60
default_connect_retryConnect-retry timer (seconds).120
enable_route_splittingSplit an announced prefix into smaller prefixes.true
split_prefix_lengthsPrefix lengths to split into.24,23,22

BGP FlowSpec [flowspec]

Targeted traffic filtering (RFC 5575 / RFC 8955 — same NLRI on the wire) as an alternative to a full blackhole. Matches protocol, ports, packet length, TCP flags, and fragmentation via the API. Actions: drop, rate-limit, accept (scrubbing nexthop), redirect (RT), mark (DSCP). When enabled, attack mitigation announces FlowSpec INSTEAD of a blackhole. Requires FlowSpec-capable routers (Juniper, Cisco IOS-XR, Nokia SR OS, Arista, Huawei, BIRD, etc.). Disabled by default.

KeyDescriptionDefault
enabledEnable FlowSpec mitigation. Toggling this live (via the API) automatically re-negotiates the address family with peers — no service restart required.false
default_actionDefault action for matched traffic: drop | rate-limit | accept | redirect | mark.drop
rate_limit_bpsBandwidth ceiling (bits/sec), used only when default_action = rate-limit.1000000000

IP Blocklist [blocklist]

Ingests threat-intelligence and operator-defined IP/CIDR feeds and enforces them via FlowSpec source-prefix drop (destination 0.0.0.0/0). Requires flowspec.enabled=true and blocklist.enforce=true. Feeds are declared in separate [blocklist_feed_N] sections — one section per feed. Feed files are plain text with one IP or CIDR per line; lines starting with # or ; are comments. Supported URLs: https://, http://, file:///path, or a local file path.

KeyDescriptionDefault
enabledEnable periodic feed refresh and blocklist ingestion.false
enforcePush FlowSpec drop rules for each entry (requires FlowSpec enabled on peers).true
refresh_interval_minutesAutomatic refresh interval in minutes.60
manual_entriesComma-separated static IP/CIDR entries merged with feeds.(empty)

Smart Detection [smart_detection]

The 3-layer Smart Detection engine (rhythm + fingerprint + memory) with ASN trust, baselines, and consensus scoring — reduces false positives by 50–70%.

KeyDescriptionDefault
enabledRequire attacks to pass smart analysis (off = threshold-only detection).true
memory_sizeMaximum attack signatures remembered (~150 bytes each).5000
memory_persistencePersist attack memory to disk across restarts.true

Trusted ASN Analysis [trusted_asn_analysis]

Lowers attack scores for traffic from CDN / cloud ASNs to prevent false positives.

KeyDescriptionDefault
enabledEnable trusted-ASN scoring.true
trusted_asnsComma-separated trusted ASN numbers (no "AS" prefix).13335,20940,15169,…
high_trust_thresholdFraction of trusted traffic for the high-trust band.0.80
high_trust_bonusScore adjustment at high trust (negative reduces score).-45
medium_trust_thresholdFraction of trusted traffic for the medium band.0.50
medium_trust_bonusScore adjustment at medium trust.-15
low_trust_thresholdFraction of trusted traffic for the low band.0.20
low_trust_bonusScore adjustment at low trust.-5
max_sources_per_asnMax sources from one trusted ASN before it looks suspicious (cloud abuse).100
log_asn_detailsLog the per-ASN breakdown in detection results.true

Trusted Destinations [trusted_destinations]

Destinations listed here are completely ignored — no alerts, webhooks, BGP, or logs.

KeyDescriptionDefault
enabledEnable destination whitelisting.true
trusted_subnetsCIDR subnets to ignore entirely (comma-separated).156.229.62.0/24
log_filteredLog filtered attacks for debugging (false = silent).false

Smart Detection Thresholds [smart_detection_thresholds]

Tunable bands for the rhythm-analysis layer.

KeyDescriptionDefault
rhythm_variance_critical / high / low / minTraffic variance bands — higher variance is more attack-like; min flags constant-rate floods.1000 / 800 / 200 / 100
rhythm_smoothness_critical / high / low / maxSmoothness bands — lower is more jagged/attack-like; max flags constant-rate floods.0.3 / 0.5 / 0.7 / 0.8
rhythm_predictability_high / lowPredictability bands — lower is more chaotic/attack-like.0.3 / 0.7
ipv6_clustering_methodMethod used to cluster IPv6 sources.simple_subnet

Pseudo-L7 Inference [pseudo_l7]

Infers application-layer attack types (DNS/NTP/SSDP/Memcached/HTTP/Slowloris) from L4 flow data.

KeyDescriptionDefault
enabledEnable pseudo-L7 inference.true
dns_amp_min_packet_sizeDNS amplification: min avg packet size from UDP src port 53.512
ntp_amp_min_packet_sizeNTP amplification: min avg packet size from UDP src port 123.468
ssdp_min_packet_sizeSSDP amplification: min avg packet size from UDP src port 1900.200
memcached_min_packet_sizeMemcached amplification: min avg packet size from UDP src port 11211.1400
http_flood_max_packet_sizeHTTP flood: max avg packet size (small requests = flood).600
http_flood_min_sourcesHTTP flood: minimum unique sources to infer.20
slowloris_max_pps_per_sourceSlowloris: max packets/sec per source (very slow connections).5.0
amplification_min_src_port_dominanceMin fraction of traffic from a single source port (0.0–1.0).0.60

Webhook (Portal Integration) [webhook_settings]

Used to push attack data to the CoreTech portal. For standalone deployments set webhook_enabled = false.

KeyDescriptionDefault
webhook_enabledSend attack data to a webhook endpoint.true
webhook_urlWebhook endpoint URL.
webhook_auth_headerAuthentication header name.Authorization
webhook_auth_tokenAuthentication token value.(secret)
detector_idUnique identifier for this detector instance.CoreDetection
debug_webhook_saveSave webhook payloads to disk for debugging.false
debug_webhook_dirFile/directory for saved payloads.webhooks.log

Webhook (Advanced) [webhook_advanced]

Reliability tuning for the webhook client.

KeyDescriptionDefault
timeout_secondsHTTP client timeout.30
insecure_tlsSkip TLS certificate verification (development only — dangerous).false
circuit_breaker_thresholdConsecutive failures before the circuit opens.5
circuit_breaker_timeoutSeconds to wait before retrying when the circuit is open.30

Security

  • Keep api_key and any tokens secret; rotate them periodically.
  • The API has no built-in TLS. If exposed beyond localhost, terminate TLS at a reverse proxy (nginx / Traefik).
  • Restrict the API port to trusted management hosts with a firewall.
  • For standalone deployments, set webhook_enabled = false.