How to Assign a Reserved Static IP to Oracle Cloud VPS
When you deploy a new Virtual Machine on Oracle Cloud Infrastructure (OCI) Free Tier, Oracle assigns your Virtual Network Interface Card (VNIC) an Ephemeral Public IP Address by default. While an ephemeral IP works fine initially, it carries a major operational flaw: if your instance is terminated, stopped, or undergoes subnet maintenance, your public IP address changes permanently.
A changing public IP address immediately breaks your custom domain DNS A-records, disrupts Let's Encrypt SSL certificate renewals, and disconnects SSH management sessions. To ensure long-term server stability, you must convert your ephemeral address into a free Reserved Public Static IP Address in the OCI Console. In this tutorial, we will cover how to allocate, assign, and bind a permanent static IP to your Oracle VPS in 5 easy steps.
If you are setting up a custom domain for the first time, make sure to read our walkthroughs on Setting Up Custom Domains & Free SSL on Oracle VPS and Opening Web Ports 80 & 443 on Oracle Cloud.
Want permanent static IPs and automated DNS routing out of the box? Avoid OCI networking complexities with RackUp IT's Managed VPS Hosting Plans, including dedicated static IPv4/IPv6 addresses and managed DNS management.
Ephemeral vs. Reserved Public IPs in Oracle Cloud
Understanding Oracle Cloud Infrastructure IP addressing rules is essential for cloud sysadmins:
- Ephemeral Public IP: A dynamic public IPv4 address assigned temporary ownership. It persists while the VM remains powered on, but is released back to Oracle's public pool if the VNIC is detached or the instance configuration is altered.
- Reserved Public IP: A permanent static public IPv4 address tied to your OCI tenancy compartment. It remains assigned to your account indefinitely and stays bound to your VM across reboots, shutdowns, and maintenance events.
Oracle Cloud Free Tier tenancies allow you to reserve up to 2 Reserved Public IPv4 addresses at $0 monthly cost!
Step 1: Navigate to OCI Instance VNIC Details
Log into your Oracle Cloud Console and open your instance network settings:
- Open the OCI Console main menu and go to Compute > Instances. Click on your active Virtual Machine name.
- Scroll down to the Resources navigation menu on the left side of the Instance Details page and click Attached VNICs.
- Click on the Primary VNIC link associated with your compute instance.
Step 2: Inspect Primary Private IP & Ephemeral Public IP
Inside the VNIC Details page, click on IPv4 Addresses under the left Resources menu. You will see your primary private IP address (e.g., 10.0.0.15) and its assigned Ephemeral Public IP.
- Click the Action Menu (Three Dots) on the far right side of your primary IPv4 address row.
- Click Edit.
Step 3: Unbind Ephemeral Public IP
In the Edit IPv4 Address pop-up window:
- Under the Public IP Type radio button section, select No Public IP.
- Click Update.
Oracle Cloud will unbind the dynamic ephemeral IP from your instance. Your VM remains active on its private IP address within your Virtual Cloud Network (VCN).
Step 4: Create & Assign Reserved Public Static IP
Now we will allocate a permanent Reserved Public IP address and bind it to your instance:
- Click the Action Menu (Three Dots) on your IPv4 address row again and select Edit.
- Under Public IP Type, select Reserved Public IP.
- Choose Create a New Reserved Public IP (or select an existing unassigned reserved IP if available).
- Enter a descriptive name for your static IP (e.g.,
Production-Web-Static-IP).
- Click Update.
OCI will allocate a brand-new permanent static IPv4 address from your tenancy reservation pool and attach it to your VM. This IP address is now yours permanently!
RackUp IT - View Cloud Hosting Plans
Click the button below to learn more and get started.
View Hosting Plans
Step 5: Update DNS Records & Test Server Connectivity
Now that your Oracle VPS possesses a permanent Reserved Public IP address:
- Copy your new Reserved Public IP from the OCI Console.
- Log into your Domain Registrar DNS Manager (Cloudflare, Namecheap, GoDaddy).
- Update your domain's
A records (both @ and www) to point to the new static IP address.
- Open your terminal and test SSH connectivity:
ssh -i ~/.ssh/id_rsa ubuntu@<YOUR_RESERVED_STATIC_IP>.
Configuring Reserved Public IPs via OCI CLI
For developers who prefer command line automation, you can also reserve and assign static public IPs using the OCI CLI:
# Allocate a new Reserved Public IP in your compartment
oci network public-ip create --compartment-id --lifetime RESERVED --display-name "MyStaticIP"
# Assign the reserved IP to your private IP OCID
oci network public-ip update --public-ip-id --private-ip-id
Troubleshooting Static IP & DNS Propagation Issues
If your web application is inaccessible after assigning a static IP, verify the following diagnostic steps:
- Flush Local DNS Cache: Run
ipconfig /flushdns on Windows or sudo dsnsubscribe -flushcache on macOS to clear stale DNS records.
- Verify Security Lists: Ensure your VCN Ingress Rules permit traffic on ports 80 and 443 for the new public IP address.
- Check OS Firewall (iptables): Confirm that local Linux firewall rules are active on your primary network interface.
- Test Global Propagation: Use online DNS tools like
whatsmydns.net to verify worldwide propagation of your new A-record across all edge resolvers.
Configuring Reverse DNS (PTR Records) for Email Delivery
If your Oracle Cloud VPS hosts a mail server or sends outbound transactional emails (such as WordPress registration or WooCommerce order notification emails), having a matching Reverse DNS (PTR) record configured for your Reserved Public IP prevents outbound emails from getting flagged as spam by Gmail, Outlook, and Yahoo filters.
Best Practices for Cloud Network IP Management
Managing static IPs across multiple cloud virtual machines requires adhering to core networking best practices:
- Label Reserved IPs Clearly: Assign descriptive display names to your reserved public IPs in the OCI Console to avoid accidental unbinding during infrastructure maintenance.
- Monitor Unassigned Reserved IPs: Periodically audit your tenancy to ensure you do not leave unassigned reserved IPs detached, maintaining clean network inventory.
- Implement Cloudflare Proxying: Pair your static public IP with Cloudflare CDN proxying to hide your origin server IP address from direct DDoS attacks.
Frequently Asked Questions (FAQ)
Does Oracle charge money for Reserved Public IPs?
No. Oracle Cloud Always Free Tier permits up to 2 Reserved Public IPv4 addresses at zero monthly cost, provided they remain attached to an active VNIC.
Will my Reserved Static IP survive instance restarts and stop/start operations?
Yes! Unlike ephemeral addresses, a Reserved Public IP remains permanently bound to your VNIC regardless of how many times you stop, restart, or reboot your Virtual Machine.
Can I transfer a Reserved Static IP to a different Oracle VPS instance?
Yes. Because Reserved Public IPs belong to your tenancy compartment rather than a specific VM, you can unbind a reserved IP from an old instance and re-attach it to a new VM in seconds without modifying your domain DNS records.
What happens if I delete my VM instance?
When an instance is terminated, its attached Reserved Public IP reverts to unassigned status in your OCI compartment. It remains in your account for future VM attachment until explicitly deleted.
Can I assign multiple public static IPs to a single Oracle Cloud instance?
OCI allows assigning secondary private IPs to a VNIC, each of which can have a separate Reserved Public IP attached, enabling multi-site hosting on a single instance.