dmitri-netbird
47352e6e45
[client] introduce client-side event aggregation ( #6627 )
...
* added an implementation of aggregating memory store
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* initial support for aggregation of events
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* added tcp-aggregation test
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* added manager integration test
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* added tracking of the number of start-, drop, and end-events in an aggregation window
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* fixes based on sonarcube checks
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* regenerated proto files
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* removed inadvertenly added google proto files
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* pacifying linter
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* update test to validate event aggregation over tcp, udp, icmp, and icmpv6
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* updated event aggregation test
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* regenerate protobufs with expected versions of protoc and protoc-gen-go
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* remove protoc/protoc-gen headers from flow_grpc.pb.go
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* updated openapi spec
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* updated openapi NetworkTrafficEvent spec, regenerated types
Signed-off-by: Dmitri <dmitri.external@netbird.io >
* respond to feedback
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* fixed an issue with how we track events that shouldn't be aggregated
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* fixed mapping of events to protobuf
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* icmp code values in aggregated events do not matter
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* regenerate openapi types
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* added a comment re: unbounded unacked events
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* reset aggregated event type to unknown
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* fix event aggregation test
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* used the source port of the earliest event
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* add tracking of window starts and ends
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* updated openapi spec
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* reverted changes to generate.sh
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* cleanup handling of not-aggregated events + test
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* responded to feedback + small fixes
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* small fix in a test
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* another test
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* force setting non-empty rule id on aggregated events
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* fixed a couple of issues flagged by coderabbit
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* fix spelling
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
* handle exhausted retry backoffs
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
---------
Signed-off-by: Dmitri <dmitri.external@netbird.io >
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io >
2026-07-06 16:04:26 +02:00
Viktor Liu
205ebcfda2
[management, client] Add IPv6 overlay support ( #5631 )
2026-05-07 11:33:37 +02:00
Viktor Liu
057d651d2e
[client, proxy] Add packet capture to debug bundle and CLI ( #5891 )
2026-05-04 11:28:56 +02:00
Viktor Liu
633dde8d1f
[client] Reconnect conntrack netlink listener on error ( #5885 )
2026-04-16 22:30:36 +09:00
Viktor Liu
c92e6c1b5f
[client] Block on all subsystems on shutdown ( #4709 )
2025-11-05 12:15:37 +01:00
Viktor Liu
404cab90ba
[client] Redirect dns forwarder port 5353 to new listening port 22054 ( #4707 )
...
- Port dnat changes from https://github.com/netbirdio/netbird/pull/4015 (nftables/iptables/userspace)
- For userspace: rewrite the original port to the target port
- Remember original destination port in conntrack
- Rewrite the source port back to the original port for replies
- Redirect incoming port 5353 to 22054 (tcp/udp)
- Revert port changes based on the network map received from management
- Adjust tracer to show NAT stages
2025-10-28 15:12:53 +01:00
hakansa
9bcd3ebed4
[management,client] Make DNS ForwarderPort Configurable & Change Well Known Port ( #4479 )
...
makes the DNS forwarder port configurable in the management and client components, while changing the well-known port from 5454 to 22054. The change includes version-aware port assignment to ensure backward compatibility.
- Adds a configurable `ForwarderPort` field to the DNS configuration protocol
- Implements version-based port computation that returns the new port (22054) only when all peers support version 0.59.0 or newer
- Updates the client to dynamically restart the DNS forwarder when the port changes
2025-10-02 01:02:10 +02:00
Viktor Liu
55126f990c
[client] Use native windows sock opts to avoid routing loops ( #4314 )
...
- Move `util/grpc` and `util/net` to `client` so `internal` packages can be accessed
- Add methods to return the next best interface after the NetBird interface.
- Use `IP_UNICAST_IF` sock opt to force the outgoing interface for the NetBird `net.Dialer` and `net.ListenerConfig` to avoid routing loops. The interface is picked by the new route lookup method.
- Some refactoring to avoid import cycles
- Old behavior is available through `NB_USE_LEGACY_ROUTING=true` env var
2025-09-20 09:31:04 +02:00
Viktor Liu
bfa5c21d2d
[client] Improve icmp conntrack log ( #3963 )
2025-06-16 10:12:59 +02:00
Viktor Liu
ea4d13e96d
[client] Use platform-native routing APIs for freeBSD, macOS and Windows
2025-06-04 16:28:58 +02:00
Zoltan Papp
802a18167c
[client] Do not reconnect to mgm server in case of handler error ( #3856 )
...
* Do not reconnect to mgm server in case of handler error
Set to nil the flow grpc client to nil
* Better error handling
2025-05-21 20:18:21 +02:00
Viktor Liu
6162aeb82d
[client] Mark netbird data plane traffic to identify interface traffic correctly ( #3623 )
2025-04-07 13:14:56 +02:00
hakansa
1ba1e092ce
[client] Enhance DNS forwarder to track resolved IPs with resource IDs on routing peers ( #3620 )
...
[client] Enhance DNS forwarder to track resolved IPs with resource IDs on routing peers (#3620 )
2025-04-07 15:16:12 +08:00
Viktor Liu
29a6e5be71
[client] Stop flow grpc receiver properly ( #3596 )
2025-03-28 16:08:31 +01:00
Viktor Liu
99b41543b8
[client] Fix flows for embedded listeners ( #3564 )
2025-03-22 18:51:48 +01:00
Maycon Santos
d9d051cb1e
Add initiator field and parse url ( #3558 )
...
- Add initiator field to flow proto
- Parse URL
- Update a few trace logs
2025-03-21 14:47:04 +01:00
Maycon Santos
cb318b7ef4
[client] Use UTC on event generation ( #3554 )
2025-03-21 11:14:51 +01:00
Maycon Santos
c02e236196
[client,management] add netflow support to client and update management ( #3414 )
...
adds NetFlow functionality to track and log network traffic information between peers, with features including:
- Flow logging for TCP, UDP, and ICMP traffic
- Integration with connection tracking system
- Resource ID tracking in NetFlow events
- DNS and exit node collection configuration
- Flow API and Redis cache in management
- Memory-based flow storage implementation
- Kernel conntrack counters and userspace counters
- TCP state machine improvements for more accurate tracking
- Migration from net.IP to netip.Addr in the userspace firewall
2025-03-20 17:05:48 +01:00