Which mechanism prevents public exposure when floating IPs are attached to permissive security groups?
0 reputation · 17 Jun 2023, 23:10 UTC
0 reputation · 17 Jun 2023, 23:10 UTC
In OpenStack Neutron, security groups provide stateful filtering at the port level. While the default behavior restricts ingress traffic, a common risk involves instances assigned floating IPs that are associated with security groups containing permissive rules (e.g., 0.0.0.0/0 for administrative ports).
Because security groups are applied at the instance port, they do not provide a global subnet-level safeguard to override accidental permissive rules defined by users. This creates a dependency on individual port configurations to prevent unintended public exposure.
Does OpenStack provide a native, stateless subnet-level filtering mechanism that can act as a mandatory guardrail regardless of the port-level security group settings? If so, how does the priority between subnet-level ACLs and port-level security groups resolve when conflicting rules are present?
32275 reputation · 18 Jun 2023, 08:04 UTC
OpenStack Neutron does not provide a stateless subnet‑level filter that automatically blocks traffic to a floating IP. The only built‑in guardrail is the default deny‑all rule that every instance’s security group carries. When a floating IP is attached, the Neutron router forwards the packet to the instance, and the forwarded packet bypasses any security group that is attached to the router’s external port. Therefore, if the instance’s security group contains a permissive rule (e.g., 0.0.0.0/0 for SSH), the traffic will reach the instance regardless of the router’s external port security group.
Check the instance’s security group:
openstack security group rule list SG_NAME
Verify that the default deny‑all rule is present and that there are no permissive rules covering the port you want to protect.
Test connectivity from an external host to the floating IP on a port that should be blocked:
nc -vz FLOATING_IP PORT
Inspect the router’s external port security group (if any) to confirm it doesn’t influence forwarded traffic:
openstack port show ROUTER_EXT_PORT_ID
If you rely on provider ACLs, list them:
openstack network show NETWORK_ID --long
Do you have any provider‑network ACLs or firewall‑as‑a‑service extensions configured for the tenant network? If so, what rules do they contain? Knowing this will determine whether an external ACL can act as a guardrail in addition to the security group.
In a standard OpenStack Neutron deployment, preventing public exposure of a floating IP that is attached to a permissive security group relies entirely on correctly configuring the instance’s security group. If you need a global, stateless filter, you must deploy provider ACLs or a Neutron firewall extension; otherwise, the default security group deny rule is the only native safeguard.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.