Back to Blog
OCI VCN Architecture for Beginners: Public and Private Subnets Explained

OCI VCN Architecture for Beginners: Public and Private Subnets Explained

   Mariusz Antonik    Networking    2 min read    127 views

Introduction

When you first set up a Virtual Cloud Network (VCN) in Oracle Cloud Infrastructure, understanding the difference between public and private subnets is critical. Get this wrong and you either expose resources that should be internal, or lock yourself out of systems you need to reach.

What is a VCN?

A VCN is your private network inside OCI. Think of it as your own data centre network that Oracle manages the physical layer for. You define the IP address space, create subnets, and control traffic using security lists and route tables.

Public Subnet

A public subnet routes outbound traffic through an Internet Gateway. Resources placed here, such as load balancers and bastion hosts, can receive inbound connections from the internet if the security list allows it.

  • Has a route to an Internet Gateway
  • Resources can be assigned a public IP
  • Suitable for: load balancers, bastion hosts, web-facing APIs

Private Subnet

A private subnet has no direct route to the internet. Outbound traffic goes through a NAT Gateway for software updates and API calls, while inbound traffic from the internet is blocked entirely.

  • No Internet Gateway route
  • Uses NAT Gateway for outbound-only internet access
  • Suitable for: application servers, databases, internal services

    Recommended Architecture for Small Teams

    A simple, secure starting point for most small teams:

    • Public subnet: Load balancer only
    • Private subnet: Application servers + database tier
    • Bastion host in public subnet for SSH access to private resources

    Summary

    Keep your application logic and data in private subnets. Only expose what genuinely needs to be internet-facing. This single principle eliminates the most common OCI security mistakes for small teams.

About the Author
Mariusz Antonik

Oracle Cloud Infrastructure expert and consultant specializing in database management and automation.

All Tags
#Advanced #alerts #Bash #bash cpu monitoring script #bash monitoring #bash scripting #Beginner #Best Practices #block volume backup #Capacity Planning #cloud backup strategy #cpu bottleneck #CPU Monitoring #cpu monitoring linux #cpu monitoring script linux #cpu trends #cpu usage trends #cpu usage trends linux #create oracle db system in oci #cron cpu monitoring #cron cpu monitoring linux #cron jobs #database monitoring #database performance #detect slow queries mysql #devops #disk capacity planning server #disk forecasting linux #disk growth trend linux #Disk Monitoring #disk usage #disk usage script linux #disk usage trends #Early Detection #easy infrastructure monitoring #free-tier #Guide #health dashboards #Health Reporting #historical server monitoring #how to monitor cpu usage linux #infrastructure #infrastructure health #infrastructure health dashboard #infrastructure health reporting #infrastructure monitoring #infrastructure monitoring report #infrastructure trends #infrastructure trends monitoring #Infrastructure Visibility #lightweight linux monitoring #lightweight monitoring #linux #linux administration #linux cpu monitoring #linux cpu usage #linux disk capacity planning #linux disk usage #Linux monitoring #linux monitoring setup #linux monitoring tools #linux performance #linux performance monitoring #linux server #linux server monitoring #linux servers #linux storage #linux tools #low maintenance monitoring #monitor cpu usage over time linux #monitor linux server health #monitor server trends #monitor small production server #monitoring without complexity #MySQL #mysql health reporting #MySQL monitoring #mysql optimization #MySQL Performance #mysql performance degradation #mysql performance monitoring #mysql performance trends #mysql query performance issues #mysql server monitoring #mysql slow queries #mysql slow query analysis #mysql slow query monitoring #mysql trends #mysql-health #networking #nsg #OCI #oci backup #oci bastion tutorial #oci block volume #oci infrastructure as code #OCI monitoring #oci networking #oci oracle database private subnet setup #oci oracle database tutorial #oci security #oci setup guide #oci terraform tutorial #oci tutorial for beginners #oci vcn terraform #oci virtual machine db system guide #oracle base database service tutorial #oracle cloud bastion #oracle cloud free tier tutorial #oracle cloud infrastructure step by step #oracle cloud infrastructure tutorial #oracle cloud storage #oracle database on oci setup #oracle-cloud #Performance #Performance Degradation #performance monitoring #performance trend monitoring #performance trends #plan disk growth server #practical server monitoring #predict disk usage growth #private instance access #query optimization #Security #security lists #server health #server health reporting #server health weekly report #server monitoring #Server Performance #server trend analysis #server-trends #simple cpu monitoring linux #simple linux monitoring #simple monitoring small business #simple monitoring system #simple ops monitoring #slow queries #slow query reporting mysql #small business infrastructure #small business IT #small business servers #small infrastructure monitoring #small server monitoring #ssh bastion #storage capacity planning linux #storage monitoring #subnets #System Health #system health reporting #terraform oci compute #terraform oracle cloud infrastructure #Trend Monitoring #trend-analysis #trends #Tutorial #vcn