LAB 26 ‐ Create Custom Security List (TCP, ICMP) - gautam-amitesh/OCI GitHub Wiki

It is considered a good practice to remove the default security list from the subnet after adding custom security list. We first create security list in OCI then we add it to required subnet.

Create Security List

  1. Navigation

    Navigation menu > Networking > Virtual cloud networks > VCN Name (hub-vcn) > Security > Create Security List
    
    image
  2. Give it a Name, select network compartment, and click Create Security List

    image

Add Security List to Subnet

  1. Navigation

    Navigation menu > Networking > Virtual cloud networks > VCN Name (hub-vcn) > Subnets > Public Subnet > Security > Add Security List
    
    image
  2. Select network compartment in compartment, select custom_SL-public_subnet-TCP-ICMP in Security List, and click Add Security List

    image

Create Security Rules

  1. In the public subnet's security tab click on newly added custom security list and navigate to Security rules section

    image image
  2. Now first we will create Ingress rule which allow remote login and ICMP from specific IP Address

    image
  3. Now we will create Egress rule which allow ICMP from specific IP Address

    image

Testing

Currently I have single instance (Bastion Server) in my Public Subnet and I don't want to create another instance in this case there are two ways to check either I can send packets from my instance to google.com or I can send packets to my instance using Command Prompt

Sending Packets to Instance

  1. Open CMD in Windows

    image
  2. Run ping command with public IP of instance

    image image
  3. It worked because above I created Ingress and Egress rules allowing ICMP for my IP Address

    image

Sending Packets from Instance

  1. First of all I need to allow ICMP communication for all IPs in Egress for that I would like to edit the rule I created earlier

    image
  2. Now run ping command in PuTTY

    image

Remove Security List

Navigate there from where we added the security list to our public subnet, click on three dot Actions menu of the particular security list, and click on Remove. Confirm by clicking Remove when prompted again

image image

Terminate Security List

Although it is not recommended to terminate active custom security list but in case if we need to terminate an inactive custom SL, navigate there from where we created the security list in our tenancy, click on three dot Actions menu of the particular security list (can't terminate default), and click on Terminate. Confirm by clicking Terminate when prompted again. I am admin in my tenancy so I am able to do so but if you are not an admin then you will need to add poilicy statment for example: Allow group <group_name> to manage virtual-network-family in compartment <compartment_name>

image image
⚠️ **GitHub.com Fallback** ⚠️