October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

AWS Networking Fundamentals: VPCs, Subnets, Routes, Internet Gateways, NACLs, and Security Groups

Learn how AWS VPCs, subnets, routing, internet gateways, security groups, and network ACLs work together—and how to trace a failed connection.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AWS network access depends on several settings working together: the VPC and subnet, the subnet’s route table, the route target, IP addressing, security group rules, and network ACL rules. A subnet is not internet-reachable just because it is named “public” or an internet gateway is attached to its VPC.

What is an AWS VPC?

An Amazon Virtual Private Cloud (VPC) is a logically isolated virtual network that you define in AWS. It has one or more IP address ranges, and you divide that space into smaller ranges called subnets. Each subnet belongs to one Availability Zone. If an architecture needs to keep operating through an Availability Zone failure, place resources in subnets in more than one zone.

As an Amazon Associate I earn from qualifying purchases.

A subnet normally has an IPv4 CIDR block; it can also use IPv6 if the VPC has an IPv6 range. An IPv6-only subnet provides instances with IPv6 but not IPv4, and requires instances on the Nitro System. See the Amazon VPC User Guide overview for the underlying VPC and subnet concepts.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do route tables work in AWS?

A route table maps a destination address range to a target, such as a gateway or connection. Each subnet uses one route table: a custom table explicitly associated with it, or the VPC’s main route table when no explicit association is made. Route tables include a local route for traffic within the VPC. When multiple routes match a destination, AWS selects the most specific matching route.

IPv4 and IPv6 destinations are distinct. 0.0.0.0/0 is the catch-all IPv4 route; ::/0 is the catch-all IPv6 route. Configuring one does not configure the other.

The route target depends on the intended path. An internet gateway can provide a route to the internet; a NAT gateway can enable private-subnet outbound internet access; and peering or VPN connections can connect networks. VPC endpoints can provide private access to AWS services without an internet gateway or NAT device. See AWS documentation on subnet route tables.

What is the difference between a public and private subnet in AWS?

A subnet is public when its associated route table has a route to an internet gateway. Without that route, it is private. The subnet’s name, CIDR block, or the mere presence of an attached internet gateway does not determine whether it is public.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an IPv4 instance to communicate with the internet through an internet gateway, it also needs a public IPv4 address or Elastic IP. An IPv6 instance needs IPv6 addressing and a route for the relevant IPv6 traffic. In both cases, security controls must allow the intended traffic.

A private subnet can still have outbound connectivity through a NAT device, or private access to AWS services through endpoints, without a direct internet-gateway route. The AWS internet gateway guide explains the address and routing requirements for internet connectivity.

What does an internet gateway do?

An internet gateway is a VPC component that enables communication between a VPC and the internet when it is attached to the VPC and used as a route target. For public IPv4 traffic, it performs one-to-one network address translation between an instance’s private IPv4 address and its public IPv4 address. It does not, by itself, make every instance reachable from the internet.

  1. Attach an internet gateway to the VPC.
  2. Associate the subnet with a route table that sends the relevant destination traffic to that gateway.
  3. Assign the instance the required public IPv4 address or IPv6 address.
  4. Allow the intended traffic in the instance’s security group and, if applicable, the subnet’s network ACL.

IPv6 addresses are globally unique and public by default, so configure filtering deliberately rather than assuming IPv6 is private. AWS’s internet gateway documentation covers gateway setup and connectivity prerequisites.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What is the difference between a security group and a network ACL?

Both control traffic, but they apply at different scopes and handle return traffic differently. A security group is attached to resources; a network ACL is associated with a subnet. AWS describes network ACLs as an additional security layer, not a replacement for security groups.

Control Scope Rules Statefulness Evaluation
Security group Resource Allow rules Stateful: response traffic for an allowed connection is permitted automatically Not an ordered allow/deny list
Network ACL (NACL) Subnet Allow and deny rules Stateless: return traffic must be allowed separately Numbered rules are evaluated from lowest to highest; the first matching rule applies

Security group rules specify a protocol, port range, and source for inbound traffic or destination for outbound traffic. Limit administrative ports such as SSH and RDP to the address ranges that need access, rather than opening them broadly. With a NACL, check both inbound and outbound rules: allowing a request in does not automatically allow its response back out. See the AWS guides for security groups and network ACLs.

How to troubleshoot a connection that is not working

Check the network path in dependency order; a permissive rule cannot compensate for a missing route, and a route cannot compensate for a missing address or blocked traffic.

  1. Confirm the resource is in the intended VPC and subnet.
  2. Check which route table the subnet uses, including whether it inherits the main route table, and find the most specific route matching the destination.
  3. Verify that the route’s target is attached and valid for the intended path.
  4. If internet access is intended, confirm the required public IPv4 or IPv6 address and corresponding route are present.
  5. Review the resource’s security group ingress and egress rules for the protocol, port, source, or destination.
  6. Review the subnet NACL’s numbered rules in both directions. For a failed response path, remember that NACLs are stateless and must permit return traffic separately.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.