🌐

VPC VPN DX

Owner
Verification
Tags
Last edited time

VPC

🗣️
Reachability Analyzer Network diagnostic tool for testing connectivity between two endpoints

VPC Endpoints

Allows to connect to AWS services within the private network

VPC Gateway Endpoint - for S3, Dynamo - need DNS resolution in the VPC

  • specify AWS:sourceVpce as a condition in the bucket policy

VPC Interface Endpoint - for Other AWS Services (creates a private ENI) use Security Group

  • need to enable DNS hostname and DNS support in the VPC
  • can be accessed from DX and VPN

Endpoint Policys

JSON policy - allows to control access using the Endpoint

NAT Gateway

A NAT gateway is a service that allows instances in a private subnet to connect to external services while preventing external services from connecting to the instances, by replacing the source IPv4 address with its private IP before sending traffic and reversing the process when sending response traffic. When you create a NAT gateway, you specify one of the following connectivity types:

Public – (Default) IA public NAT gateway can be used to connect instances in private subnets to the internet, other VPCs, or an on-premises network, and must be associated with an elastic IP address at creation. Traffic is routed from the NAT gateway to the internet gateway for the VPC, or through a transit gateway or virtual private gateway for other connections.

Private – Private subnets in a VPC can connect to other VPCs or an on-premises network through a private NAT gateway, but traffic routed from the NAT gateway to an internet gateway will be dropped.

NAT Instance – When a connection times out, a NAT instance sends a FIN packet to close the connection with any resources behind it.

NAT Gateway – When a connection times out, a NAT gateway sends an RST packet to any resources behind the NAT gateway that attempt to continue the connection, instead of sending a FIN packet.

NAT Gateway

A NAT gateway enables private subnet instances to connect to external services while preventing those services from connecting to the instances. It does this by replacing the source IPv4 address with the instance's private IP and then reversing the process when sending response traffic. There are four types of NAT gateways, each specified by their connectivity type:

AWS Netwrok Firewall

Protects the entire VPC and covers all connections using Rules, filters protocols

VPC Flow Logs

Inbound Reject = NACL or SG

Inbound Accepted - Outbound Rejected = NACL (SG ALLOWS ALL OUT BY DEFAULT)

VPC Routing

Every VPC has a main route table that is associated with all subnets

can create a private route table to every subnet

VPC Web Proxy

Companies can use AWS VPN/Direct Connect or build a proxy farm with Squid and ELB to improve performance, filter URLs, monitor security, and protect against threats. A web proxy like Squid can limit outbound web connections from a VPC and be scaled, highly available, and automated with whitelists or DNS filtering.