mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
Add handshakes.max_rate to limit new handshakes per second
Nebula is vulnerable to DoS via handshake flooding since each incoming handshake performs expensive DH operations. This adds a token bucket rate limiter to the handshake manager that caps both inbound and outbound new handshakes per second. When the limit is reached, new handshakes are silently dropped and counted via the handshake_manager.rate_limited metric. Configured via handshakes.max_rate (default 0 = unlimited). Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This commit is contained in:
@@ -342,6 +342,14 @@ logging:
|
||||
# after receiving the response for lighthouse queries
|
||||
#trigger_buffer: 64
|
||||
|
||||
# max_rate limits the number of new handshakes per second. Both incoming and outgoing new
|
||||
# handshakes count against this limit. Once the limit is reached, new handshakes are dropped
|
||||
# until the next second. A value of 0 means unlimited (default).
|
||||
# This is useful for preventing DoS attacks that attempt to exhaust CPU with handshake crypto.
|
||||
# Running `openssl speed ecdhp256` on your hardware can be a good rule of thumb for choosing
|
||||
# a max, as each handshake performs similar DH operations.
|
||||
#max_rate: 0
|
||||
|
||||
# Tunnel manager settings
|
||||
#tunnels:
|
||||
# drop_inactive controls whether inactive tunnels are maintained or dropped after the inactive_timeout period has
|
||||
|
||||
Reference in New Issue
Block a user