All technological notes.
Classless Inter-Domain Routing
Security Groups rules and AWS networking in generalThey help to define an IP address range:
0.0.0.0/0 => all IPsCIDR
Base IP and Subnet MaskBase IP
Subnet Mask
/0, /24, /32Can take two forms:
/8 <=> 255.0.0.0/16 <=> 255.255.0.0/24 <=> 255.255.255.0/32 <=> 255.255.255.255The Subnet Mask basically allows part of the underlying IP to get additional next values from the base IP

ip/num => number of IP = 2^(32-num) => 32-num octets can changeThe Internet Assigned Numbers Authority (IANA) established certain blocks of IPv4 addresses for the use of private (LAN) and public (Internet) addresses
Private IP can only allow certain values:
10.0.0.0 - 10.255.255.255 (10.0.0.0/8) <= in big networks172.16.0.0 - 172.31.255.255 (172.16.0.0/12) <= AWS default VPC in that range192.168.0.0 - 192.168.255.255 (192.168.0.0/16) <= e.g., home networksPublic IP:
IPv4 designed to provide 4.3 Billion addresses (they’ll be exhausted soon)
IPv6
0000 to ffff)2001:db8:3333:4444:5555:6666:7777:88882001:db8:3333:4444:cccc:dddd:eeee:ffff::: all 8 segments are zero2001:db8::: the last 6 segments are zero::1234:5678: the first 6 segments are zero2001:db8::1234:5678: the middle 4 segments are zeroIPv4 cannot be disabled for your VPC and subnetsIPv6 (they’re public IP addresses) to operate in dual-stack mode
IPv4 and a public IPv6IPv4 or IPv6 to the internet through an Internet Gateway
IPv6 (the space is very large)IPv4 in your subnetIPv4 CIDR in your subnet












CIDR
VPC
Virtual Private CloudSubnets
Internet Gateway: for VPC
Route Tables: for Subnet
IGW, VPC Peering onnections, VPC Endpoints, …ClassicLink: for EC2
EC2 instances privately to your VPCVPC Peering: between VPC
VPC Endpoints: for AWS service within VPC
S3 + DynamoDBAWS PrivateLink / VPC Endpoint Services: for AWS service within VPC
Network Load Balancer & ENISite-to-Site VPN: with on-premises via public
Customer Gateway on DC,Virtual Private Gateway on VPC,AWS VPN CloudHub: multiple sites
Direct Connect: DX location, private
Virtual Private Gateway on VPC, and establish a direct private connection to an AWS Direct Connect LocationDirect Connect Gateway: DX regions
Transit Gateway: peering
Bastion Host: SSH
SSH connectivity to EC2 instances in private subnetsNAT Instances: internet access
NAT Gateway: internet access IPv4
IPv4 onlyEgress-only Internet Gateway: internet access IPv6
IPv6NACL:Subnet level
Ephemeral PortsSecurity Groups: instance level
VPC Flow Logs: log
VPC / Subnet / ENI Level, for ACCEPT and REJECT traffic,Athena or CloudWatch Logs InsightsTraffic Mirroring: copy
ENIs for further analysis