This rule specifies that VPC flow logs must be enabled to ensure system and information integrity.
Rule
VPC flow logs should be enabled
Framework
NIST 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.
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.
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.
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.
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.
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.
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: