Skip to content

Instantly share code, notes, and snippets.

@Insidexa
Created October 30, 2024 18:05
Show Gist options
  • Save Insidexa/bd2497d72ba201361252c5276594fb79 to your computer and use it in GitHub Desktop.
Save Insidexa/bd2497d72ba201361252c5276594fb79 to your computer and use it in GitHub Desktop.
nat gw
graph TD
%% Section 1: Як працювало з Public Subnet
subgraph Public_Subnet ["Now - Public Subnet"]
EC2_A[EC2Instance]
EC2_B[EC2 Instance B]
JFrog_Repo_403[JFrog Registry<br/>403 Forbidden]
Internet[Internet]
%% Підключення Public Subnet
EC2_A -->|Public random IP| Internet
EC2_B -->|Public random IP| Internet
Internet -->|403 Forbidden<br/>Random IP out of CIDR| JFrog_Repo_403
end
%% Section 2: Як має працювати з NAT Gateway
subgraph Private_Subnet ["Recommended - with NAT gw"]
EC2_A_New[EC2 Instance A]
EC2_B_New[EC2 Instance B]
NAT_GW[NAT Gateway Static IP]
%% Підключення через NAT Gateway
EC2_A_New -->|Private IP| NAT_GW
EC2_B_New -->|Private IP| NAT_GW
NAT_GW -->|Static Public IP| Internet_New[Internet]
Internet_New -->|Allowed CIDR| JFrog_Repo_Access[JFrog Registry<br/>Access Granted]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment