Skip to content

Cherry-pick #22996 to 7.x: [Packetbeat] Update ingress/egress traffic directionality#23048

Merged
andrewstucki merged 2 commits intoelastic:7.xfrom
andrewstucki:backport_22996_7.x
Dec 10, 2020
Merged

Cherry-pick #22996 to 7.x: [Packetbeat] Update ingress/egress traffic directionality#23048
andrewstucki merged 2 commits intoelastic:7.xfrom
andrewstucki:backport_22996_7.x

Conversation

@andrewstucki
Copy link
Copy Markdown

@andrewstucki andrewstucki commented Dec 9, 2020

Cherry-pick of PR #22996 to 7.x branch. Original message:

What does this PR do?

This changes the way Packetbeat classifies network directionality to bring it in line with ECS 1.7. It adds a home_networks option to the configuration and works like the following:

  1. If Packetbeat sees a packet with a source/destination that is either link-local or corresponds to an IP on the host, it is classified as ingress or egress
  2. If we can't classify as ingress or egress and home_networks is specified, we try to classify at the network perimeter
  3. Perimeter classification is as follows:
match private ip as destination + private ip as source = internal
match private ip as destination + public ip as source = inbound
match public ip as destination + private ip as source = outbound
match public ip as destination + public ip as source = external
  1. If home_networks is not specified, then the direction remains "unknown"

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

)

* [Packetbeat] Update ingress/egress traffic directionality

* Fix yml indentation

* Fix up changelog

* rename to internal_networks and use network conditions

* Fix up broken link

* Stupid bad merges

* Re-add eroneously deleted entry

(cherry picked from commit cc2dd9f)
@andrewstucki andrewstucki requested a review from a team as a code owner December 9, 2020 22:27
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 9, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 9, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Dec 9, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #23048 updated

  • Start Time: 2020-12-09T22:29:17.033+0000

  • Duration: 65 min 22 sec

Test stats 🧪

Test Results
Failed 0
Passed 1081
Skipped 10
Total 1091

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 1081
Skipped 10
Total 1091

@andrewstucki andrewstucki merged commit be5bdd9 into elastic:7.x Dec 10, 2020
@andrewstucki andrewstucki deleted the backport_22996_7.x branch December 10, 2020 00:19
@zube zube bot removed the [zube]: Done label Mar 10, 2021
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 this pull request may close these issues.

3 participants