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

[tcp/udp] Add a configuration option for network type #40407

Closed
taylor-swanson opened this issue Jul 31, 2024 · 1 comment · Fixed by #40623
Closed

[tcp/udp] Add a configuration option for network type #40407

taylor-swanson opened this issue Jul 31, 2024 · 1 comment · Fixed by #40623
Assignees
Labels

Comments

@taylor-swanson
Copy link
Contributor

taylor-swanson commented Jul 31, 2024

Overview

Go provides an argument to the Listen function (likewise for ListenTCP and ListenUDP) to specify the type of network (IPv4, IPv6, or both/auto) to be used when creating the listener. The network type for the TCP and UDP inputs are tcp and udp, respectively, and there is currently no way to override this value. Certain situations may require locking down the type of network being used (such as providing a hostname or using localhost).

The TCP input would accept these values for the network type:

  • tcp (default)
  • tcp4
  • tcp6

The UDP input would accept these values for the network type:

  • udp (default)
  • udp4
  • udp6

Examples

filebeat.inputs:
- type: tcp
  max_message_size: 10MiB
  host: "localhost:9000"
  network: tcp4
filebeat.inputs:
- type: udp
  max_message_size: 10KiB
  host: "localhost:8080"
  network: udp4

Acceptance Criteria

  • When no option is provided, the default value (udp or tcp) is used
  • When an option is provided, it must be a valid value, all other values must raise an error
  • The option/default is applied to the listener and can be verified in netstat (or equivalent) output
  • Documentation added for new config fields
@elasticmachine
Copy link
Collaborator

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

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

Successfully merging a pull request may close this issue.

3 participants