Search code examples
oracle-cloud-infrastructure

Opening port 80 on Oracle Cloud Infrastructure Compute node


This is an elementary question however one I cannot seem to resolve by perusing the Oracle Cloud Infrastructure documentation. I've created an Ubuntu-based compute node, and it's attached to a subnet. In that subnet I've created a stateful rule with source 0.0.0.0/0, IP protocol: TCP, Source Port Range: All, Destination Port Range: 80.

There is no firewall configured on the server.

Despite this configuration I can't access the compute node's public IP. Any ideas?


Solution

  • When deploying compute instances at Oracle Cloud Infrastructure you need to take into account few things:

    1. Create Internet Gateway (IGW).
    2. Define routes to point to IGW.
    3. Allow port 80 in the Security List associated with the IGW. By default you only have access to SSH and ICMP 3,4 type.
    4. Allow connectivity on Compute's instance firewall (which is enabled by default).

    In your example if you are using a OEL shape:

    $ sudo firewall-cmd --zone=public --permanent --add-port=80/tcp
    
    $ sudo firewall-cmd --reload