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

Figure out how to collect AWS Network Firewall using Amazon Data Firehose #84

Open
zmoog opened this issue May 2, 2024 · 4 comments
Open

Comments

@zmoog
Copy link
Owner

zmoog commented May 2, 2024

Goal

Suppose I own an AWS account, and I want to export AWS Firewall log events from AWS to an Elastic cluster.

Context

What are the AWS Network Firewall logs?

Requirements & Limitations

  • supports EC (Elastic Cloud) deployments only
  • EC deployment must be on AWS (deployments on Azure or GCP are not supported)
  • does not support AWS PrivateLink yet (but it's coming soon)

Preparation

  • install the latest AWS integration on your Elastic cluster

Steps

  • Overview
  • Select a resource
  • Create a Firehose stream
  • Set up logging
  • Verify
@zmoog zmoog self-assigned this May 2, 2024
@zmoog zmoog added the research label May 2, 2024
@zmoog zmoog added this to Notes May 2, 2024
@zmoog zmoog moved this to In Progress in Notes May 2, 2024
@zmoog zmoog changed the title Figure out how to collect AWS Firewall logs using Amazon Data Firehose Figure out how to collect AWS Network Firewall using Amazon Data Firehose May 2, 2024
@zmoog
Copy link
Owner Author

zmoog commented May 2, 2024

Select a resource

  • use an existing AWS Network Firewall
  • create a new AWS Network Firewall for testing
  • Set up logging

Use an existing AWS Network Firewall

Create a new AWS Network Firewall for testing

  • Open the VPC service in the AWS console.
  • Create a VPC and other networking resources.
  • Create an AWS Network Firewall
  • Set up the firewall policy

Open the VPC service in the AWS console

The best option to create a VPC for a quick test is to use the wizard in the AWS console.

Create a VPC and other networking resources

The default settings are fine, you only need to pick a good name for your VPC resources.

CleanShot 2024-05-02 at 13 06 52

Create an AWS Network Firewall

Set up the firewall policy

  • create a rule group

Deploy an EC2 to generate network traffic

  • launch an EC2, select the VPC we just created, enable "Auto-assign public IP"

Set up logging

To enable logging, edit your firewall setting by opening the "Logging" section.

If you want to quickly check your Network Firewall logs before setting up Firehose, you can enable logging on CloudWatch, and then inspect the log events:

CleanShot 2024-05-02 at 16 39 03

Visit CloudWatch and open your log group. If everything is working correctly, you will see something like this:

CleanShot 2024-05-02 at 16 42 47

@zmoog
Copy link
Owner Author

zmoog commented May 2, 2024

Create a Firehose stream

We need a Firehose stream to collect the AWS Network Firewall logs and send them to a data stream on an Elastic stack.

To create a Firehose stream, you can use the instructions at Monitor Amazon Web Services (AWS) with Amazon Data Firehose up to step 3. However, you must set two things differently.

  • Name
  • Parameters

Name

Pick a name for your Firehose stream.

Parameters

Follow the instructions up to step 3 except for the "parameters".

Use the following parameters:

Name Value
es_datastream_name logs-aws.firewall_logs-default

@zmoog
Copy link
Owner Author

zmoog commented May 2, 2024

Set up logging

CleanShot 2024-05-02 at 16 53 08

@zmoog
Copy link
Owner Author

zmoog commented May 2, 2024

Verify

WIP

CleanShot 2024-05-02 at 17 31 27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant