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.
-
Navigation
Navigation menu > Networking > Virtual cloud networks > VCN Name (hub-vcn) > Security > Create Security List
-
Give it a
Name, selectnetwork compartment, and clickCreate Security List
-
Navigation
Navigation menu > Networking > Virtual cloud networks > VCN Name (hub-vcn) > Subnets > Public Subnet > Security > Add Security List
-
Select
network compartmentin compartment, selectcustom_SL-public_subnet-TCP-ICMPin Security List, and clickAdd Security List
-
In the public subnet's security tab click on newly added custom security list and navigate to
Security rulessection
-
Now first we will create
Ingressrule which allow remote login and ICMP from specific IP Address
-
Now we will create
Egressrule which allow ICMP from specific IP Address
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
-
Open CMD in Windows
-
Run
pingcommand withpublic IPof instance
-
It worked because above I created Ingress and Egress rules allowing ICMP for my IP Address
-
First of all I need to allow
ICMPcommunication for all IPs in Egress for that I would like to edit the rule I created earlier
-
Now run
pingcommand in PuTTY
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
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>