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

Patch 395 #417

Merged
merged 15 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions en/aws/ec2/open-postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
| **Recommended Action** | Restrict TCP port 5432 to known IP addresses |

## Detailed Remediation Steps
1. Log into the AWS Management Console.
1. Log in to the AWS Management Console.
2. Select the "Services" option and search for EC2. </br> <img src="/resources/aws/ec2/open-postgresql/step2.png"/>
3. Scroll down the left navigation panel and choose "Security Group" under "Network & Security".</br> <img src="/resources/aws/ec2/open-postgresql/step3.png"/>
4. Select the "EC2 Security Group" that needs to be verified. </br> <img src="/resources/aws/ec2/open-postgresql/step4.png"/>
5. Scroll down the bottom panel and choose "Inbound". Verify the value for "Source" column for "PostgreSQL" under "Type" for port "5432" and if any rule have value set to "0.0.0.0/0" or "::/0 " then the selected "Security Group" has "TCP" port for "PostgreSQL" open to the public.</br> <img src="/resources/aws/ec2/open-postgresql/step5.png"/>
5. Scroll down the bottom panel and choose "Inbound rules". Verify the value for "Source" column for "PostgreSQL" under "Type" for port "5432" and if any rule have value set to "0.0.0.0/0" or "::/0 " then the selected "Security Group" has "TCP" port for "PostgreSQL" open to the public.</br> <img src="/resources/aws/ec2/open-postgresql/step5.png"/>
6. Repeat steps number 2 - 5 to verify other "Security Groups" in the selected AWS region.</br>
alphadev4 marked this conversation as resolved.
Show resolved Hide resolved
7. Navigate to "Security Groups" under "Network & Security" and select the "Security Group" that needs to modify to restrict the access of "TCP" port 5432 for "PostgreSQL" to specific ip address. </br> <img src="/resources/aws/ec2/open-postgresql/step7.png"/>
alphadev4 marked this conversation as resolved.
Show resolved Hide resolved
8. Scroll down the page and select the "Inbound" and click on the "Edit" button. </br> <img src="/resources/aws/ec2/open-postgresql/step8.png"/>
8. Scroll down the page and select the "Inbound rules" and click on the "Edit inbound rules" button. </br> <img src="/resources/aws/ec2/open-postgresql/step8.png"/>
9. In the "Edit inbound rules" tab select either the "MyIP" or "Custom" from the "Source" column.</br> <img src="/resources/aws/ec2/open-postgresql/step9.png"/>
10. In the "Edit inbound rules" tab select the "MyIP" from the "Source" column to allow "PostgreSQL" inbound traffic only from specific IP address.</br> <img src="/resources/aws/ec2/open-postgresql/step10.png"/>
10. In the "Edit inbound rules" tab select the "MyIP" from the "Source" column to allow "PostgreSQL" inbound traffic only from your IP address.</br> <img src="/resources/aws/ec2/open-postgresql/step10.png"/>
11. In the "Edit inbound rules" tab select the "Custom" from the "Source" column as per the requirements for "PostgreSQL" and specify static IP/Elastic IP address along with "Description" for the "Security Group" rule. </br> <img src="/resources/aws/ec2/open-postgresql/step11.png"/>
12. Click on the "Save" button to make the necessary changes. </br> <img src="/resources/aws/ec2/open-postgresql/step12.png"/>
12. Click on the "Save rules" button to make the necessary changes. </br> <img src="/resources/aws/ec2/open-postgresql/step12.png"/>
13. Repeat steps number 7 - 12 to restrict TCP port 5432 for "PostgreSQL" to known IP address.</br>

alphadev4 marked this conversation as resolved.
Show resolved Hide resolved
Binary file modified resources/aws/ec2/open-postgresql/step10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/ec2/open-postgresql/step9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.