LAB 25 ‐ Allow TCP in Security List - gautam-amitesh/OCI GitHub Wiki
We know that the Default Security List provided by OCI only allows us to log in to our instance via the SSH Application Layer Protocol, which relies on the TCP Transport Layer Protocol. While performing cleanup in the Default SL rules, we did not remove the ingress rule allowing TCP at Port 22 for All Sources, because we wanted users to be able to log in to the instance. However, we also wanted to prevent unauthorized access. Therefore, in this case, we need to allow TCP connections at Port 22 only from specific Public IP/IPs. These Public IPs are assigned by the Internet Service Provider (ISP), and depending on the type of service (Dynamic/Static IP) you have subscribed to, the Public IP may change if it is a Dynamic IP—for example, when the router restarts, after a power outage, or when the ISP refreshes its network. Hence, it is recommended to update the Public IP in the Security List from the OCI console everyday to ensure secure and smooth login.
First lets delete the Ingress Rule allowing TCP in our Default SL to check what happens:
-
Click on the three dot
Actionsmenu available inTCPrule container and clickRemove -
Now when I try to login it shows an error
-
Now lets allow
TCPconnection overPort 22but this time I'll add my Public IP for that I need to know my IP for that I open What Is My IP Address -
If you want to allow log in from multiple IPs you can do it simply by clicking
Another Ingress Ruleand add same rule for that IP -
Now lets check log in again