Strategies to Optimize AWS Security Group Port Configuration

0

Hello! How I can narrow down/limit the ports of an existing Security Group that currently allows all traffic. How can I validate which destinations and ports I actually need to permit while blocking the rest of the traffic, ensuring that it doesn't affect the operation of the workload? Thank you!

profile picture
질문됨 10달 전212회 조회
2개 답변
0

You could use Flow logs to see the in and out traffic for the hosts in question to help minimise the access.

But overly, knowing how your application or system works should dictate what ports you allow in or out.

profile picture
전문가
답변함 10달 전
profile picture
전문가
검토됨 10달 전
0

Flow Logs are a good way of achieving this. For example, you can enable them on the network interfaces that use the Security Group in question and leave them running for some time until they collect enough information about your traffic.

Currently Flow Logs can publish data to CloudWatch Logs, Amazon S3 and Kinesis Data Firehose.

Once the data has been collected, there are several ways you can analyse it. For example, use CloudWatch Logs Insights or Amazon Athena.

It should give you fairly good understanding of what ports and IPs are used. Always keep in mind that Flow Logs should run for long enough to make sure that they capture all ports and IPs that your applications may need. It is better to double-check and schedule a maintenance window to apply changes to Security Groups if you are not sure and want to test how it is going to affect your workload.

Don't forget to consider the pricing when collecting a lot of data with the help of Flow Logs.

AWS
Max
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠