Create and Configure a Public Subnet in a VCN

Before you can run VMs in another compartment's VCN, you must first create a public subnet in your VCN with security rules that allow inbound access from and outbound access to VB Studio.

  1. Sign in to Oracle Cloud Console.
  2. In the upper-left corner, click Navigation Menu the Menu icon.
  3. Select Networking and select Virtual Cloud Networks.
  4. Under List Scope, select the compartment.
  5. From the VCNs list, click the VCN's name.
  6. Under Resources, click Security Lists, and then click Create Security List.
  7. In Name, enter a name for the security list.
  8. In Create in Compartment, ensure that the correct compartment is selected.
  9. In Allow Rules for Ingress, click + Another Ingress Rule and follow these steps:
    1. In Source Type, select CIDR.
    2. In Source CIDR, enter 0.0.0.0/0.
    3. In Destination Port Range, enter 9082.
    4. (Optional) In Description, add a description.
    5. Click + Another Ingress Rule and repeat steps 9a through 9d to add ports 9085 and 22.
    6. (Only if you are using Docker executors) Click + Another Ingress Rule and repeat steps 9a through 9d to add ports 8095 and 9001-9010 to 0.0.0.0/0 and add port 443 to your VCN CIDR (for example 10.0.0.0/16).
  10. In Allow Rules for Egress, click + Another Egress Rule and follow these steps:
    1. In Source Type, select CIDR.
    2. In Source CIDR, enter 0.0.0.0/0.
    3. In IP Protocol, select All Protocols.
    4. (Optional) In Description, add a description.
  11. Click Create Security List.
    After creating the security list, click its name to verify the ingress and egress rules you added.

    Here's an example of ingress rules:

    Here's an example of the egress rule:

  12. Return to the VCN's details page.
  13. Under Resources, select Subnets and follow these steps to create a public subnet:
    If you want to edit an existing public subnet, jump to the next step.
    1. Click Create Subnet.
    2. In Name, enter the subnet's name.
    3. In Create in Compartment, select the correct compartment.
    4. In Subnet Type, make sure that Regional is selected.
    5. In CIDR Block, enter the subnet's CIDR block.
      Don't set it to 172.17.0.0/16 as it's the default subnet allocated to Docker.
    6. In Route Table, select the VCN's route table.
    7. In Subnet Access, make sure that Public Subnet is selected.
    8. In DHCP Options, select the VCN's DHCP options.
    9. In Security List, select the security list you created in step 6.
    10. Fill in the other fields as required.
    11. Click Create Subnet.
  14. If you want to edit an existing subnet, follow these steps:
    1. Under Resources, select Subnets and click the public subnet's name.
    2. Click Add Security List.
    3. In the Add Security List dialog box, in Security List, select the security list you created in step 6.
    4. Click Add Security List.
That's it. After creating or editing the public subnet, your VM executors can now run in the VCN.