Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: VPC Flow Logs Should be Enabled

This rule specifies that VPC flow logs must be enabled to ensure system and information integrity.

RuleVPC flow logs should be enabled
FrameworkNIST 800-53 Revision 5
Severity
High

Rule Description:

VPC flow logs should be enabled for compliance with the NIST 800-53 Revision 5 security standard. VPC flow logs provide visibility into the network traffic within your Amazon Virtual Private Cloud (VPC). Enabling VPC flow logs allows you to capture information about all traffic going to and from network interfaces in your VPC, which can be useful for various security and troubleshooting purposes.

Troubleshooting Steps:

If VPC flow logs are not enabled or not functioning properly, you can follow these troubleshooting steps:

  1. 1.

    Verify VPC Flow Log Status:

    • Go to the Amazon VPC console.
    • Select the desired VPC.
    • In the "Flow Logs" tab, ensure that "Status" for the flow log is set to "Active".
    • If the status is not "Active", select the flow log and click on "Actions" > "Modify".
    • Check the configurations and make any necessary changes. Click on "Save" to update the settings.
  2. 2.

    Check IAM Role and Permissions:

    • Ensure that the IAM role attached to the flow logs has necessary permissions to create CloudWatch logs, write to S3 (if configured), and create flow logs in the VPC.
    • If you need to modify the IAM role, go to the IAM console and update the required policies.
  3. 3.

    Verify CloudWatch Log Group:

    • If you are sending VPC flow logs to CloudWatch Logs, make sure the log group is created and configured correctly.
    • Go to the CloudWatch console, select "Logs" from the sidebar, and verify if the log group associated with the flow log exists.
    • If not, create a new log group and ensure the flow log is configured to send logs to this group.
  4. 4.

    Check Network ACL and Security Group:

    • Ensure that the necessary inbound and outbound rules are configured in network ACLs and security groups to allow traffic for the desired flow logging.
    • Review the rules and make changes if they are blocking the flow log traffic.
  5. 5.

    Verify S3 Bucket Permissions:

    • If the VPC flow logs are stored in an S3 bucket, ensure that the IAM role associated with the flow log has the necessary permissions to write to the bucket.
    • Check the bucket policy and IAM role policies to verify the permissions.
  6. 6.

    Validate VPC Configuration:

    • Validate the VPC configuration to ensure that you have subnets, EC2 instances, and other network resources within the VPC.
    • If there are any issues with the VPC configuration, rectify them as required.

Necessary Codes:

If you are creating a flow log through AWS CLI or AWS SDK, you can use the following AWS CLI command as an example:

aws ec2 create-flow-logs --resource-ids <vpc-id> --traffic-type ALL --log-group-name <log-group-name> --deliver-logs-permission-arn <role-arn> --region <region>

Ensure to replace

<vpc-id>
with the actual ID of your VPC,
<log-group-name>
with the desired CloudWatch log group name,
<role-arn>
with the IAM role ARN for the flow logs, and
<region>
with the appropriate AWS region.

Step-by-Step Remediation Guide:

To enable VPC flow logs for compliance with NIST 800-53 Revision 5, follow these step-by-step instructions:

  1. 1.
    Open the AWS Management Console and navigate to the Amazon VPC service.
  2. 2.
    Select the desired VPC for which you want to enable flow logs.
  3. 3.
    Choose the "Flow Logs" tab.
  4. 4.
    Click on the "Create Flow Log" button.
  5. 5.
    Configure the following settings:
    • For "Filter", select "All".
    • Choose a destination for logs: CloudWatch Logs or Amazon S3.
    • If using CloudWatch Logs, select an existing log group or create a new one.
    • If using S3, choose an existing bucket or create a new one.
    • Specify the IAM role that should have permission to deliver logs to CloudWatch Logs or S3.
    • Choose the desired "Log format".
    • Optionally, add any "Tag" pairs for better log identification.
  6. 6.
    Click on the "Create" button to enable the VPC flow logs.
  7. 7.
    Verify that the flow log status is set to "Active" on the "Flow Logs" tab.
  8. 8.
    If necessary, modify the flow log configurations by selecting the flow log and clicking on "Actions" > "Modify".
  9. 9.
    Test the VPC flow logs by generating some network traffic within the VPC and reviewing the captured logs in either CloudWatch Logs or S3.
  10. 10.
    Ensure that the VPC flow logs are being regularly monitored and reviewed to identify any potential security or operational issues.

By following these steps, you can enable VPC flow logs and meet the compliance requirements of NIST 800-53 Revision 5.

Is your System Free of Underlying Vulnerabilities?
Find Out Now