Assigning a Static IP Address and Opening HTTP/HTTPS Ports for Your Oracle Cloud Instance

Introduction

In the previous blog post, we discussed how to assign a static IP address to a virtual machine (VM) instance in Oracle Cloud. In this post, we’ll take it a step further and show you how to not only assign a static IP address but also open HTTP and HTTPS ports to enable web services on your Oracle Cloud instance. This is an essential part of setting up a web server, application, or any service that requires internet access.

Prerequisites

Before you begin, ensure you’ve completed the steps from the previous blog post and have:

  1. An Oracle Cloud account.
  2. A VM instance with an ephemeral IP address.

How to open HTTP/HTTPS Ports

Step 1: Access the Oracle Cloud Console

  1. Open your web browser and navigate to the Oracle Cloud Console (https://cloud.oracle.com/).
  2. Sign in to your Oracle Cloud account.

Step 2: Navigate to the VM Instance

  1. On the Oracle Cloud Dashboard, click on the “Navigation Menu.”
  2. Under “Core Infrastructure,” select “Compute” and then “Instances.”

Step 3: Select Your VM Instance

  1. Choose the VM instance to which you want to assign the static IP address and open HTTP/HTTPS ports.

Step 4: Configure Security Lists

  1. Scroll down to the “Resources” section of your VM instance’s details page.
  2. Under “Networking,” click on “Virtual Cloud Network.”
  3. Select the Virtual Cloud Network (VCN) associated with your VM instance.

Step 5: Configure Security Rules

  1. In the VCN details, click on “Security Lists” in the left-hand navigation menu.
  2. Choose the security list associated with your VM instance.

Step 6: Add Ingress Rules for HTTP and HTTPS

  1. To open HTTP and HTTPS ports, click “Add Ingress Rules.”
  2. Create two rules:
    • For HTTP (Port 80), add a rule with the source set to “0.0.0.0/0” and the destination port range set to “80.”
    • For HTTPS (Port 443), add a rule with the source set to “0.0.0.0/0” and the destination port range set to “443.”
  3. Save your changes.

Step 7: Verify and Apply

  1. Check your security rules to ensure that they include the newly added ingress rules for HTTP and HTTPS.
  2. If everything is correct, apply the changes.

Step 8: Test Connectivity

  1. After configuring security rules, test the connectivity of your web server or service by accessing it using the static IP address and the appropriate HTTP or HTTPS protocol (e.g., http://yourstaticip or https://yourstaticip).

Conclusion: By following the steps outlined in this blog post, you’ve successfully assigned a static IP address to your Oracle Cloud instance and opened HTTP and HTTPS ports. This makes your VM accessible over the web, allowing you to host web services, applications, or websites securely. Remember to consider security best practices when opening ports, and regularly monitor and update your security rules as needed.

Leave a Reply

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