Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Packetbeat] Offer a config option to select default route interface as 'device' #31905

Closed
andrewkroh opened this issue Jun 10, 2022 · 5 comments

Comments

@andrewkroh
Copy link
Member

Describe the enhancement:

When configuring Packetbeat you must specify a network interface to monitor (see docs for device). For example,

packetbeat.interfaces.device: eth0

This enhancement idea to allow users to specify a special default_route value, and Packetbeat would monitoring the interface associated with the default route.

packetbeat.interfaces.device: default_route     # PROPOSED

The interface associated with the default route can change (e.g. switching from wifi to ethernet) so ideally Packetbeat would "watch" the routing configuration and react to changes.

Describe a specific use case for the enhancement or feature:

When on Windows and macOS, the special any interface is not an option. This default_route option would provide a default value behaves as most users expect. This could be used as the default value in Windows and macOS packetbeat.yml files. And it could be used as the default value in the Network Packet Capture integration since it works for all operating systems.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@efd6
Copy link
Contributor

efd6 commented Jun 14, 2022

What would be the behaviour wrt choice of IPv4/IPv6? Maybe make options default_route (first default found in {IPv4,IPv6}), default_route_ipv4 (first default route found for IPv4) and default_route_ipv6 (the obvious action).

This should catch >99% of use cases, but will fail in interesting ways for people with multiple default routes or where services that are being monitored are specifically routed, so this should be documented clearly.

@andrewkroh
Copy link
Member Author

Maybe make options default_route (first default found in {IPv4,IPv6}), default_route_ipv4 (first default route found for IPv4) and default_route_ipv6

I think that is a great idea.

@efd6
Copy link
Contributor

efd6 commented Sep 20, 2022

The majority of the work has been done for this — feature is complete, but I am leaving it open to ensure that the clean-ups requested in #32732 and #32933 are not forgotten.

@efd6
Copy link
Contributor

efd6 commented Oct 20, 2022

Closing after offline discussion agreeing to abandon remaining tasks — reasons provided in #31905 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants