Question 1
An audit finds that a subnet's security list permits ingress SSH (TCP 22) from 0.0.0.0/0, and the team must stop internet SSH access to that subnet while keeping SSH from an on-premises range. What is the correct action in the OCI security-rule model?
A. Edit or remove the existing rule so the only remaining TCP 22 allow rule has the on-premises range as its source, since unmatched traffic is denied implicitlyCorrect answer
Correct: with allow-only rules and an implicit deny for everything unmatched, blocking traffic means eliminating or narrowing the allow rule that permits it.
B. Add a deny rule for TCP 22 from 0.0.0.0/0 and place it above the existing allow rule
Assumes deny rules and rule ordering exist. OCI security rules are allow-only and unordered, so there is no deny rule to add and no position that would take effect.
C. Add an NSG to the instances with a rule allowing TCP 22 only from the on-premises range, which will restrict what the security list permits
Relies on a narrower NSG rule overriding a broader security list rule; because the layers are additive, the 0.0.0.0/0 allow would still stand.
D. Change the existing rule from stateful to stateless, which stops unsolicited inbound connections from the internet
Confuses statefulness with scope. Stateless only turns off connection tracking; the rule still allows inbound TCP 22 from the same source range.
Explanation
OCI security rules — in both security lists and network security groups — express only what is allowed; anything not matched by a rule is denied implicitly, and there are no deny rules and no rule priorities. Restricting access therefore means editing or deleting the overly broad allow rule so that only the intended source remains. Adding a narrower rule elsewhere cannot help because a VNIC's effective permissions are the union of all its rules, and switching a rule to stateless changes only connection tracking, not which sources are permitted.