Courseiva
1Z0-1127Chapter 9 of 18Objective 5.1

Networking and Security for Generative AI

Networking and security for generative AI. It solves the problem of keeping your AI models safe and fast while they talk to the internet, other systems, and users. For the 1Z0-1127 exam, you must understand how Oracle Cloud Infrastructure organises these digital boundaries, pathways, and controls so that a generative AI application can run without leaks, slowdowns, or unauthorised access.

12 min read
Intermediate
Updated Jul 23, 2026
Reviewed by Johnson Ajibi· Senior Network & Security Engineer · MSc IT Security

A simple way to picture Networking and Security for Generative AI

The Nightclub Security Manager Analogy

A nightclub security manager called Alex oversees a large, trendy club that has a VIP artist performing in a private studio inside. The artist, who uses a special AI-powered hologram generator, needs a steady, private connection to the internet to pull in live fan data from around the world. Alex must make sure that fans at the bar can post selfies, the DJ can stream music, and the hologram artist can receive data -- without anyone hacking into the VIP studio or crashing the network.

Alex sets up a velvet rope (a firewall) at the main entrance. Only paying guests with a valid ticket pass through. Inside, Alex creates a separate, soundproofed corridor (a virtual private cloud or VPC) that leads only to the VIP studio. This corridor is guarded by a dedicated bouncer (a security list) who checks every data packet -- every single digital message -- before it touches the hologram generator. Outside, Alex uses a special wristband system (identity and access management or IAM) that gives each staff member a unique access code. The sound technician can enter the corridor, but the bartender cannot.

When the artist asks for more data from a server across town, Alex routes the request through a secure tunnel (a VPN) that wraps the information in an encrypted bubble, so nobody at the bar can eavesdrop. Alex also sets up a private, direct line (a dedicated circuit or FastConnect) to the internet for the hologram generator, bypassing the crowded public pipes. If the artist's system gets overloaded with fan data, Alex can instantly add more processing power (auto-scaling) inside the private corridor, without letting in any extra guests. The entire system works because Alex has locked down every pathway, authenticated every user, and isolated the precious AI workload from the chaos of the main club.

How It Actually Works

Generative AI models, like the ones powering chatbots or image generators, are heavy pieces of software that need to communicate with the outside world. They need to receive prompts from users, fetch data from databases, and send back responses. Without proper networking and security, this communication is like shouting secrets across a crowded room -- anyone could hear, interrupt, or even steal the messages.

Lets start with the most fundamental concept: the Virtual Cloud Network (VCN). A VCN is a private, software-defined network inside Oracle Cloud. Think of it as a fenced-off plot of digital land that you own. You decide who can enter, what roads (subnets) are built, and which traffic flows where. When you launch a generative AI model in OCI, you place it inside a VCN so it can talk to other resources securely.

Inside a VCN, you carve out subnets -- smaller sections of the network that group related resources together. For example, you might have a public subnet for a web server that users can reach, and a private subnet for the AI model that no user can access directly. The AI model in the private subnet can still talk to the web server, but it is hidden from the open internet. This is the principle of defence in depth: you never expose the AI itself to the wild.

To control traffic, you use security rules. Oracle Cloud gives you two main layers: security lists and network security groups (NSGs). A security list is a set of rules attached to a whole subnet. An NSG is more granular and attaches to specific virtual network interface cards (VNICs) -- the digital network adapters inside your resources. Both work as firewalls, deciding which data packets (small chunks of data) can enter or leave based on source IP address, destination IP address, port number, and protocol. For a generative AI workload, you would typically allow only HTTPS traffic (port 443) from your application to the model, and block everything else.

Now, how do users actually reach your AI model? They come through the internet, but you need a controlled entry point. This is where the internet gateway comes in. An internet gateway is a virtual router that allows traffic between your VCN and the public internet. But you should never put your AI model directly behind this gateway. Instead, you place a load balancer in a public subnet. The load balancer acts as a receptionist: it receives user requests, spreads them across multiple AI model instances to avoid overloading any one (a practice called load balancing), and passes only clean, authorised traffic to the private subnet where the AI lives.

For even more security, you can add a web application firewall (WAF) in front of the load balancer. The WAF inspects every request for malicious patterns, like SQL injection or cross-site scripting, before it ever reaches the AI model. This is critical because generative AI apps often accept free-form text prompts, which are a favourite target for attackers.

What about connecting your AI model to data stored in a corporate data centre? Maybe the AI needs to pull customer records from an on-premises database. You cannot send that data over the public internet -- it is too risky. Instead, you use a VPN (Virtual Private Network) or OCI FastConnect. A VPN creates an encrypted tunnel through the public internet. FastConnect is a private, physical cable from your data centre directly to Oracle Cloud, bypassing the internet entirely. Both options create a secure bridge between your existing network and the VCN.

Finally, there is identity and access management (IAM). IAM is the system that controls who can do what with your cloud resources. You define compartments (folders) to organise resources, groups to organise users, and policies to grant permissions. For instance, a policy might say 'Allow the group AI-Engineers to manage AI models in the compartment AI-Projects'. This ensures that only authorised people can modify, deploy, or even see your generative AI models.

To tie everything together, OCI also provides logging and monitoring. Every network connection, every authentication attempt, and every security rule hit is recorded in logs. These logs feed into monitoring dashboards so you can spot anomalies -- like a sudden spike in failed login attempts that might indicate an attack. By combining networking controls (VCNs, subnets, gateways), security filters (security lists, NSGs, WAF), IAM policies, and monitoring, you create a fortress around your generative AI that is both resilient and flexible.

Network path from a user request through security layers (Internet Gateway, Load Balancer, WAF) to a generative AI model in a private subnet, with secure connections to Oracle services and on-premises data.

Walk-Through

1

Plan Your VCN and Subnets

Decide on the IP address range for your VCN (e.g., 10.0.0.0/16). Then carve out at least two subnets: a public subnet (10.0.1.0/24) for the load balancer and a private subnet (10.0.2.0/24) for the generative AI model instances. This isolation is the foundation of your security.

2

Configure Security Lists and NSGs

Attach security lists to each subnet. For the public subnet, allow inbound HTTPS (port 443) from 0.0.0.0/0. For the private subnet, allow inbound HTTPS only from the public subnet's CIDR. Optionally, attach an NSG to the AI model instance that further restricts traffic to only the load balancer's IP address.

3

Deploy a Load Balancer with WAF

Create a load balancer in the public subnet. Configure it with SSL termination to decrypt user requests, inspect them, and re-encrypt them for the AI model. Enable the web application firewall (WAF) to block malicious requests. The load balancer distributes traffic across multiple AI instances for high availability.

4

Set Up Secure Connectivity to On-Premises Data

If the AI model needs data from your corporate data centre, establish a FastConnect or VPN connection. Attach a dynamic routing gateway (DRG) to your VCN and associate the connection. Configure route tables in the VCN to direct traffic for on-premises IP ranges through the DRG.

5

Create IAM Policies and Compartments

Put your VCN, load balancer, and AI model instances in a dedicated compartment (e.g., 'GenAI-Projects'). Create groups (e.g., 'AI-Engineers', 'Security-Admin'). Write policies that grant only the necessary permissions, such as 'Allow group AI-Engineers to manage ai-model in compartment GenAI-Projects'.

6

Enable Logging and Monitoring

Turn on VCN flow logs to record every packet entering and leaving your network. Set up monitoring metrics for the load balancer (e.g., request count, error rate) and configure alerts for anomalies. Send logs to Oracle Cloud Logging or an external SIEM for analysis.

What This Looks Like on the Job

An IT professional working for a mid-sized healthcare company needs to deploy a generative AI chatbot that helps doctors summarise patient records. The chatbot must be secure because it handles protected health information (PHI). The first thing the professional does is design the VCN. They create two subnets: a public one for a load balancer and a private one for the AI model servers. The model servers sit in the private subnet with no direct internet access.

Next, they configure security lists. The public subnet's security list allows inbound HTTPS traffic (port 443) from any source to the load balancer. The private subnet's security list allows only inbound traffic from the public subnet on port 443. No other traffic -- not even SSH for administration -- is allowed from the outside. To manage the servers, the professional uses a bastion host (a jump server) that sits in the public subnet, and only that bastion can SSH into the private subnet.

The professional then sets up a load balancer. They configure health checks to ensure the AI model instances are alive. They enable SSL termination on the load balancer, meaning the encrypted HTTPS traffic from the user is decrypted at the load balancer, inspected, then re-encrypted before being sent to the AI model. This ensures that even internal traffic is encrypted.

Now, what about the patient data? The AI model needs to query an on-premises database. The professional deploys OCI FastConnect to establish a private, dedicated link between the hospital's data centre and the VCN. They configure routing in the VCN to send all traffic destined for the database IP range through the FastConnect link. They also create an IAM policy that gives the load balancer's service account permission to invoke the AI model, but not to read the database directly. The AI model has a separate service account with restricted read-only access to specific database tables.

Finally, the professional enables VCN flow logs and sets up a monitoring alert. If the flow logs show a sustained high volume of traffic from a single IP address hitting the load balancer with malformed requests, an alert fires. The professional then investigates using the logs, identifies the source as a botnet, and updates the WAF rules to block that IP range. The entire deployment is documented, audited quarterly, and tested with penetration testing to ensure no data leaks exist. This step-by-step approach ensures the generative AI chatbot meets healthcare compliance standards while remaining fast and available to doctors.

How 1Z0-1127 Actually Tests This

The 1Z0-1127 exam tests your knowledge of networking and security for generative AI in a very specific way. You will see scenario-based multiple-choice questions where you must choose the correct combination of OCI services to meet a requirement. The exam loves to test your ability to distinguish between similar services and understand where each fits.

Key concepts the exam focuses on:

The difference between a security list and a network security group (NSG). Security lists are stateless (you must define both inbound and outbound rules separately) and apply to an entire subnet. NSGs are stateful (if you allow inbound traffic, the outbound return traffic is automatically allowed) and apply to individual VNICs. The exam often presents a scenario where an administrator accidentally uses a security list with a missing return rule, causing connectivity failure, and asks you to identify the fix.

When to use an internet gateway versus a NAT gateway versus a service gateway. An internet gateway lets resources with public IPs communicate with the internet. A NAT gateway allows resources in a private subnet to initiate outbound connections to the internet (for example, to download updates) while remaining unreachable from the internet. A service gateway lets private subnet resources access Oracle services (like Object Storage) without going through the internet. The exam will give a scenario like 'An AI model needs to download a model update from the internet but should not be accessible from the internet' -- the correct answer is a NAT gateway.

The role of dynamic routing gateway (DRG) in connecting VCNs and on-premises networks. You should know how DRG works with routing tables to enable hybrid cloud setups.

IAM policies and compartments. The exam at practical level of detail: you must know the structure of an OCI policy statement (e.g., 'Allow group [name] to manage [resource-type] in compartment [name]'). Questions may ask you to write a policy that grants an AI engineer the ability to only deploy and manage AI models, but not delete them.

Common traps: confusing security lists (stateless) with NSGs (stateful); thinking that a VCN is automatically secure without configuration; believing that putting a resource in a private subnet means it cannot reach the internet at all (it can, via a NAT gateway); and mixing up the direction of rules (inbound vs outbound). The exam also tests whether you know that generative AI services in OCI, like the AI service endpoints, are accessed via service gateways to keep traffic off the public internet.

To pass, memorise the network path for a typical user request: user -> internet -> internet gateway -> load balancer -> WAF -> private subnet -> AI model -> service gateway for data access. Practice identifying which component handles which task. Exam questions often include a diagram with missing arrows or components and ask you to select the correct arrangement.

Key Takeaways

A Virtual Cloud Network (VCN) is your private, virtual fence inside Oracle Cloud that isolates your generative AI resources from everything else.

Use security lists for broad, stateless rules on an entire subnet and network security groups (NSGs) for fine-grained, stateful rules on individual resources.

Never expose your generative AI model directly to the internet; always place it behind a load balancer and a web application firewall (WAF) in a private subnet.

A NAT gateway lets private resources initiate outbound internet connections (e.g., downloading model updates) but blocks all inbound traffic from the internet.

For connecting on-premises data to your AI model securely, use FastConnect for a dedicated private link or a VPN for an encrypted tunnel over the public internet.

IAM policies and compartments ensure that only authorised people and services can access your generative AI models, obeying the principle of least privilege.

Logging and monitoring (like VCN flow logs) are essential to detect, investigate, and respond to security incidents in your AI network.

Security in OCI follows the shared responsibility model: Oracle secures the cloud infrastructure, but you must secure everything you put inside it.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Security List

Applies to an entire subnet at once

Stateless: you must define both inbound and outbound rules explicitly

Simpler for broad, subnet-level controls

Network Security Group (NSG)

Applies to individual VNICs (virtual network cards)

Stateful: allowed inbound traffic automatically permits return traffic

Granular and best for per-instance or per-service group security

Internet Gateway

Allows both inbound and outbound internet traffic for resources with public IPs

Resources using it are reachable from the internet (if public IP is assigned)

Used for resources that need to be publicly accessible

NAT Gateway

Allows only outbound internet traffic from private subnets

Resources using it are not reachable from the internet

Used for private resources that need to fetch updates or data from the internet

FastConnect

Dedicated, physical private cable between your data centre and OCI

Higher bandwidth, lower latency

More expensive and takes longer to provision

Site-to-Site VPN

Encrypted tunnelling over the public internet

Lower bandwidth, higher latency

Cheaper and faster to set up

Load Balancer

Distributes traffic across multiple backend servers at layer 4 (TCP/UDP) or layer 7 (HTTP/HTTPS)

Supports SSL termination and health checks

Best for general web traffic and high availability

API Gateway

Manages, secures, and routes API calls at layer 7

Supports rate limiting, API keys, and request transformation

Best for managing RESTful APIs behind generative AI models

Watch Out for These

Mistake

Placing a generative AI model in a private subnet automatically makes it secure.

Correct

A private subnet only prevents direct inbound traffic from the internet. You still need security lists or NSGs, proper IAM policies, and monitoring to secure the model. Without those rules, resources in the private subnet can still talk to each other freely and could be compromised.

Beginners hear 'private subnet' and think it is a magical safe zone. They forget that threats often come from inside the network (compromised web servers or malicious users with access).

Mistake

Security lists and network security groups (NSGs) are interchangeable and you can use whichever you prefer.

Correct

They serve different purposes. Security lists are stateless and apply to entire subnets, while NSGs are stateful and apply to specific VNICs. You often use both. For example, a broad security list might block all inbound traffic except HTTP, and an NSG on the AI model instance might allow only trusted CIDRs.

The exam questions deliberately test this distinction. Beginners who treat them as the same thing fail to understand why their rules are not working as expected (e.g., stateless security lists require explicit return rules).

Mistake

A NAT gateway allows external users to reach your private AI model.

Correct

A NAT gateway only allows outbound traffic from private subnets to the internet. It does not allow any inbound connections from the internet. If you need external users to reach your AI model, you must use a load balancer or internet gateway with proper security.

The name 'NAT' sounds like it might let traffic in (Network Address Translation can work both ways in some contexts), so beginners assume it works like a door that swings both ways.

Mistake

Once you set up a fast connection like FastConnect, security is fully handled by Oracle.

Correct

FastConnect provides a private physical link, but you still control the routing, firewall rules, and IAM policies on the VCN side. Oracle does not manage your security lists, NSGs, or user permissions. You are responsible for securing everything from the point where the FastConnect enters your VCN onward.

There is a common assumption that 'private' means 'secure by default'. Beginners out to believe that because Oracle owns the cable, Oracle also owns the security. The cloud shared responsibility model is often misunderstood.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between a security list and a network security group in OCI?

A security list applies to an entire subnet and is stateless (you must define return rules), while an NSG applies to individual VNICs and is stateful (return traffic is automatically allowed). Use security lists for broad controls and NSGs for fine-grained per-instance security.

Can I put my generative AI model directly in a public subnet?

Yes, but it is strongly discouraged for production. Doing so exposes the model to the open internet, increasing the risk of attacks. Best practice is to place the model in a private subnet and use a load balancer in a public subnet as the entry point.

How do I connect my on-premises database to an AI model in OCI securely?

You have two main options: OCI FastConnect (a dedicated, private physical link) or a site-to-site VPN (an encrypted tunnel over the internet). Both create a secure bridge, but FastConnect offers better performance and lower latency.

What is the difference between an internet gateway and a NAT gateway?

An internet gateway allows resources with public IPs to communicate with the internet in both directions. A NAT gateway allows resources in private subnets to initiate outbound connections to the internet but blocks all inbound connections from the internet.

Do I need a web application firewall (WAF) for a generative AI chatbot?

Yes, because generative AI apps accept free-form text input, which is a common vector for attacks like SQL injection and prompt injection. A WAF inspects each request for malicious patterns and blocks them before they reach the model.

How do I control who can access my AI model in OCI?

Use OCI Identity and Access Management (IAM). Create a compartment for your AI resources, add users to groups, and write policies that grant specific permissions (e.g., 'deploy', 'manage', 'read') to those groups. Combine this with network security layers (security lists/NSGs) for defence in depth.

Terms Worth Knowing

Keep going

You've finished Networking and Security for Generative AI. Continue through the 1Z0-1127 study guide to build a complete picture of the exam.

Done with this chapter?