Opening Ports on Instances
By default, inbound traffic is not allowed to Compute Classic instances. Instances in a security list can communicate with other instances in the same security list, but inbound traffic to the security list is not permitted by default. To open a port for Compute Classic instances in a security list by using the REST API, you must create a security rule, specifying the source from which traffic should be permitted, the protocol and port over which the traffic should be allowed, and the security list (containing your instance) to which traffic should be allowed.
Prerequisites
-
Ensure that the instances for which you want to open ports are in a security list. See Setting Up Firewalls Around Instances.
-
Identify the source from which you want to allow traffic to your instances. The source can be other Compute Classic instances or hosts external to Compute Classic.
Workflow
Task | Procedure / CLI Command |
---|---|
1. Do one of the following:
|
|
2. Identify the security application (that is, the protocol-port combination) over which you want to permit traffic. | sec-application get |
3. If the security application that you need does not exist, then create one. | sec-application add |
4. Create a security rule, specifying the source (security list or security IP list) from which traffic should be permitted, the security application over which the traffic should be allowed, and the security list (containing your instance) to which traffic should be allowed. | sec-rule add |
See Also:
The following topics in Using Oracle Cloud Infrastructure Compute Classic: