My AWS VPC Setup - Twinset-industries-LTD vpc-043462ceeb7c80144 in eu-north-1
Why I Decided to Create a Custom VPC
My DevOps learning journey has involved working with both on-premises infrastructure and AWS. I have been experimenting with a K3s cluster in my home lab, and I wanted to take my networking knowledge further by building a custom Virtual Private Cloud (VPC) in AWS.
For this exercise, I created a VPC in the Europe (Stockholm) region, eu-north-1, with the name Twinset-industries-LTD.
AWS confirmed that the VPC was created successfully. Its ID is vpc-043462ceeb7c80144, and its IPv4 CIDR block is 192.168.0.0/16.
Creating a VPC is straightforward through the AWS Management Console. Understanding the settings, however, requires more thought. DNS options, IP address planning, route tables, and network access controls all affect how the network will behave as the project grows.
I'm documenting this exercise as part of my journey towards understanding AWS networking more deeply. My goal isn't just to create resources, but to understand the purpose of each setting and the decisions involved in designing a network.
In this post, I'll explain the configuration I saw in the VPC details pane, why some of the settings matter, and what I need to review before using the network for a larger deployment.
1. Understanding the Core VPC Configuration
VPC ID
My VPC was assigned the ID vpc-043462ceeb7c80144.
A VPC ID is a unique identifier that AWS assigns to a VPC. Other networking resources, such as subnets and route tables, are associated with the VPC they belong to.
I also assigned a descriptive name to make the resource easier to identify in the AWS Console. Using meaningful names and tags can make infrastructure easier to manage, especially when an account contains several projects.
AWS Region: Europe (Stockholm)
I created the VPC in eu-north-1, which is the AWS Region for Europe (Stockholm).
AWS Regions matter because they determine where resources are deployed. When choosing a region for a real application, I would consider the location of its users, service availability, operating costs, data residency requirements, and any applicable compliance obligations.
Selecting a European region alone does not guarantee GDPR compliance. Compliance also depends on how the application handles personal data, how the environment is configured, and the organisation's broader data protection practices.
VPC State: Available
The console showed the VPC state as Available.
This means AWS has created the VPC and made it available for use. It does not mean the network is already ready to host an application.
I still need to create the required subnets, configure routing, decide how workloads will access other networks, and review the security controls.
IPv4 CIDR Block: 192.168.0.0/16
The VPC uses the IPv4 CIDR block 192.168.0.0/16.
CIDR stands for Classless Inter-Domain Routing. It is a way of representing an IP address range using an address and a prefix length.
For this configuration, the range covers addresses from 192.168.0.0 to 192.168.255.255. The subnet mask is 255.255.0.0, giving the range 65,536 total IPv4 addresses before accounting for AWS subnet reservations and other allocation considerations.
The 192.168.0.0/16 range belongs to the private IPv4 address space defined by RFC 1918. Private addresses are not directly routable across the public internet.
However, using a private address range does not automatically secure a network. Routing, security groups, network ACLs, identity permissions, and the configuration of individual resources still matter.
An Important Lesson About CIDR Overlap
There is one important issue I need to resolve before connecting this VPC to my on-premises K3s environment.
My home lab already uses addresses in the 192.168.0.0/16 range. That means the address range I selected for AWS overlaps with the range used by my existing network.
At first, I thought using the same private address range would make connecting the two environments easier. On closer inspection, that is not a sound assumption.
When two networks connected through a VPN use overlapping address ranges, routing becomes more complicated because the same destination address may exist in both networks. For example, 192.168.0.5 could refer to a machine in my home lab or a different machine in AWS.
A better approach is to plan non-overlapping address ranges before connecting the networks. I need to review my existing on-premises addresses and select an appropriate AWS CIDR range before proceeding with a Site-to-Site VPN.
This is a useful reminder that a VPC can be created successfully while its address plan still needs improvement.
IPv6 CIDR: Not Assigned
I did not assign an IPv6 CIDR block when creating the VPC.
For this stage of the exercise, I am concentrating on IPv4 networking. IPv6 can be introduced later if the application's requirements justify it.
Leaving IPv6 unconfigured does not remove the need to secure the IPv4 network. I still need to review the routing and access controls for every subnet and workload.
Fig 1: AWS VPC vpc-043462ceeb7c80144 Twinset-industries-LTD created successfully in eu-north-1 with IPv4 CIDR 192.168.0.0/16, DNS resolution Enabled and main route table rtb-0d02fe385aa439ed4
2. Understanding the VPC DNS Settings
The VPC details pane showed two important DNS settings:
DNS resolution: Enabled
DNS hostnames: Disabled
These settings are related, but they do different jobs.
DNS Resolution
DNS resolution allows resources in the VPC to use the Amazon-provided DNS resolver to resolve domain names.
The resolver is available through the address 169.254.169.253 and through the VPC's primary IPv4 CIDR range plus two. For my selected CIDR, the latter address is 192.168.0.2.
This is important because applications and cloud services frequently rely on DNS rather than communicating through hard-coded IP addresses.
DNS Hostnames
DNS hostnames is a separate VPC setting. It affects the DNS hostname functionality available to resources launched in the VPC.
I initially left this setting disabled because I was thinking about limiting unnecessary exposure. However, disabling VPC DNS hostnames is not a replacement for security controls such as security groups, private subnet design, or restricting public IP assignments.
AWS also requires both DNS resolution and DNS hostnames to be enabled for certain DNS features, including private hosted zones and private DNS for interface VPC endpoints.
Before deploying workloads, I need to confirm which DNS features they will use and configure these settings accordingly.
DHCP Option Set
The VPC details pane also displayed a DHCP option set.
DHCP options can provide network configuration information, including domain names and DNS server settings, to resources in a VPC.
For this project, the default DHCP option set is a reasonable starting point. If I later introduce custom DNS servers or integrate the network with an existing directory service, I will need to review the configuration.
3. Route Tables and Network Access Controls
Main Route Table
AWS created a main route table for the VPC. Its ID is rtb-0d02fe385aa439ed4.
A route table determines where network traffic is directed. The initial main route table contains a local route for the VPC's own IPv4 range.
This local route allows communication between appropriately configured resources within the VPC. It does not automatically provide internet access.
For a future deployment, I will need to decide which subnets should be public and which should be private.
A typical design may include:
Public subnets: Subnets whose route tables direct internet-bound traffic through an internet gateway, subject to the other required configuration.
Private subnets: Subnets without a direct route to the internet through an internet gateway. A NAT gateway may be used when workloads need outbound IPv4 internet connectivity.
A subnet is not public merely because it has a particular name. Its routing, address assignment, and security configuration determine how it can communicate with other networks.
I will create and associate suitable route tables as the network develops rather than assuming that the initial main route table is sufficient for every workload.
Internet Gateway and NAT Gateway
The VPC will need additional networking components if I want to support internet connectivity.
An internet gateway provides a path between a VPC and the internet when the required routes and resource configurations are in place.
A NAT gateway can allow resources in private subnets to initiate outbound IPv4 connections without requiring those resources to have public IPv4 addresses.
These components serve different purposes. A NAT gateway is not a replacement for an internet gateway, and neither one replaces security groups or network ACLs.
Before deploying them, I will consider availability, routing, data transfer, and ongoing costs.
Network ACL
The VPC details pane displayed the main network ACL with the ID acl-08e521c07b73beaf1.
A network access control list, or NACL, is a stateless traffic filter associated with subnets. It evaluates inbound and outbound traffic according to its numbered rules.
The default network ACL allows inbound and outbound traffic. That is useful for an initial setup, but it should not be interpreted as proof that every resource in the VPC is secure.
Security groups provide another important layer of traffic control and are stateful. In a real deployment, I would design security groups and NACLs according to the application's actual requirements rather than applying blanket rules without considering how the application communicates.
For example, a web application might need inbound HTTPS access through a load balancer while keeping its application servers inaccessible directly from the public internet.
VPC Block Public Access
The console also provides a feature called VPC Block Public Access. It can help prevent internet traffic through internet gateways and egress-only internet gateways, depending on the selected mode and configured exclusions.
Its behaviour needs to be understood before enabling it in an environment that depends on public connectivity.
For example, bidirectional blocking can disrupt internet traffic to and from workloads unless the appropriate exclusions are configured. I would first map the required traffic flows and test the effect of the selected mode before applying it to a production environment.
4. Tenancy and Other VPC Settings
Tenancy: Default
The VPC uses default tenancy.
Tenancy determines whether eligible EC2 instances run on shared hardware or dedicated hardware, subject to the applicable EC2 configuration.
Default tenancy is a reasonable starting point for many applications. Dedicated infrastructure may be appropriate when there are specific technical, contractual, or compliance requirements, but the additional cost and service limitations should be evaluated before choosing it.
Default VPC: No
The console showed that this is not the account's default VPC.
A custom VPC gives me more control over the address ranges, subnets, route tables, and security configuration for this project.
However, a custom VPC is not automatically secure simply because it is not the default VPC. Its actual security depends on how I configure and manage the resources inside it.
Network Address Usage Metrics
The Network Address Usage metrics setting was disabled in my configuration.
These metrics can help monitor IP address usage. They may become useful as I create more subnets and deploy additional resources.
Rather than relying on a universal threshold, I will monitor address availability against the planned workload size and AWS service requirements.
Route 53 Resolver DNS Firewall
The details pane did not show an attached Route 53 Resolver DNS Firewall rule group.
DNS Firewall can be used to help control DNS queries made through the Route 53 Resolver. It may be useful when an environment needs additional controls over which domain names workloads can resolve.
It is one possible layer in a broader security design, not a replacement for monitoring, least-privilege permissions, and other network protections.
5. What I Plan to Build Next
This VPC is the beginning of a broader networking exercise. My next steps are to review the address plan and then build the remaining components in stages.
Step 1: Review the VPC CIDR and select an address plan that does not overlap with the on-premises K3s network.
Step 2: Create subnets across multiple Availability Zones and decide which workloads need public or private connectivity.
Step 3: Configure the required internet gateway, NAT gateway, and route tables after reviewing the intended traffic flows and costs.
Step 4: Review security groups, network ACLs, and DNS settings before deploying workloads.
Step 5: Evaluate how the AWS environment could connect to my existing K3s lab through a VPN, using a non-overlapping address plan.
I am also interested in learning more about managed Kubernetes through Amazon EKS and how application workloads can use private networking.
However, I will treat EKS, database deployment, and VPN connectivity as separate stages of the project. Each introduces additional networking and security requirements that need to be understood before implementation.
Conclusion
Creating a VPC is only the first step in building an AWS network. The configuration becomes meaningful when I understand how its address range, DNS settings, route tables, and access controls work together.
This exercise also reminded me that a successful resource creation message does not mean every design decision is correct. My VPC was created successfully, but I still need to review the overlapping CIDR range before connecting it to my on-premises K3s environment.
That is part of my learning process as I move from experimenting with individual cloud resources towards understanding how they fit into a larger infrastructure design.
Question: When planning an AWS VPC, how do you choose an address range that will leave room for future subnets while avoiding conflicts with existing networks?

Comments
Post a Comment