Softwarelicensing

Oracle Cloud Open Port – A Step-by-Step Guide

Oracle Cloud Open Port – A Step-by-Step Guide

In a cloud environment, an essential step for accessing resources and services from the internet is the open cloud port, and the Oracle Cloud Infrastructure (OCI) is no different. It offers a secure environment and explicitly requires port opening.

In this article, we’ll provide a step-by-step guide on how to open ports in Oracle Cloud, specifically on Ubuntu.

How to Open Ports in Oracle Cloud on Ubuntu:

  1. Log in to your Ubuntu instance in Oracle Cloud using SSH.
  2. Check the firewall status by running the following command:
luaCopy codesudo ufw status
  1. If the firewall is not enabled, run the following command to enable it:
bashCopy codesudo ufw enable
  1. To open a port, run the following command, replacing <port> with the port number you want to open:
bashCopy codesudo ufw allow <port>/tcp

For example, if you want to open port 80, run the following command:

bashCopy codesudo ufw allow 80/tcp
  1. After running the command, verify that the port has been opened by running the following command:
luaCopy codesudo ufw status
  1. Restart the firewall to apply the changes by running the following command:
Copy codesudo ufw reload
  1. You can also open a range of ports by running the following command, replacing <start port> and <end port> with the range of ports you want to open:
phpCopy codesudo ufw allow <start port>:<end port>/tcp

For example, to open ports from 8000 to 9000, run the following command:

bashCopy codesudo ufw allow 8000:9000/tcp
  1. To block a port, run the following command, replacing <port> with the port number you want to block:
bashCopy codesudo ufw deny <port>/tcp
  1. After running the command, verify that the port has been blocked by running the following command:
luaCopy codesudo ufw status

Opening ports in Oracle Cloud Infrastructure (OCI) is essential for accessing resources and services from the internet.

Following the step-by-step guide, you can open and close ports on Ubuntu in OCI. Remember always to check the firewall status and verify that the port has been opened or blocked after running the commands.

By taking these steps, you can ensure that your resources and services in OCI are accessible only to authorized users and devices.

Author

  • Fredrik Filipsson

    Fredrik Filipsson possesses 20 years of experience in Oracle license management. Having worked at Oracle for 9 years, he gained an additional 11 years of expertise in Oracle license consulting projects. Fredrik has provided assistance to over 150 organizations worldwide, ranging in size and tackling various Oracle licensing challenges, including Licensing Assessments, Oracle audits, Oracle ULAs, and more.