π‘οΈ Oracle IAAS Network Security Group allows unrestricted SSH trafficπ’
- Contextual name: π‘οΈ IAAS Network Security Group allows unrestricted SSH trafficπ’
- ID:
/ce/ca/oracle/network/network-security-group-allows-unrestricted-ssh-traffic - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- Internal:
dec-x-fe5d4f07
Similar Internal Rulesβ
| Rule | Policies | Flags |
|---|---|---|
| βοΈ dec-x-fe5d4f07 | 1 |
Descriptionβ
Descriptionβ
This policy identifies Oracle IAAS Network Security Groups that allow unrestricted ingress from the internet to the Secure Shell (SSH) port,
TCP/22.Rationaleβ
SSH is commonly used to administer Linux workloads and other networked systems. Allowing SSH access from
0.0.0.0/0or::/0exposes administrative interfaces to internet-wide scanning, brute-force attempts, credential stuffing, and exploitation of vulnerable SSH services. Network security group rules should allow SSH only from trusted administrative networks, bastion hosts, VPN ranges, or other controlled access paths.Impactβ
Restricting public SSH ingress can block administrative connections that currently depend on open internet access. Confirm that administrators have an approved access path before removing or narrowing existing rules.
Auditβ
This policy flags an Oracle IAAS Network Security Group as
INCOMPLIANTwhen it has at least one related rule that meets all of the following conditions:
Directionis INGRESS.Sourceis 0.0.0.0/0 or ::/0.... see more
Remediationβ
Remediationβ
Restrict Public SSH Accessβ
From OCI CLIβ
List the current ingress rules:
oci network nsg rules list \
--nsg-id {{network-security-group-ocid}} \
--direction INGRESS \
--allIf the offending rule is not required, remove it by rule ID:
oci network nsg rules remove \
--nsg-id {{network-security-group-ocid}} \
--security-rule-ids '["{{security-rule-id}}"]'If the rule is required but too broad, generate a sample update payload, edit it to replace public source CIDRs with approved administrative ranges, and apply the update:
oci network nsg rules update --generate-full-command-json-input > update-nsg-rules.json
oci network nsg rules update \
--nsg-id {{network-security-group-ocid}} \
--from-json file://update-nsg-rules.jsonUpdate only the specific NSG rules that require correction and verify that unrestricted SSH access has been removed after the change.