Security Groups
Coming from another cloud?
▸AWS·Security Groups
Security Groups
- AWS stateful auto-response.
- OpenStack stateless explicit.
- OpenStack port/project.
- AWS default inbound deny/outbound all.
▸Azure·Network Security Groups (NSGs)
Network Security Groups (NSGs)
- NSGs can associate to both subnets and NICs with specific processing order (inbound: subnet then NIC; outbound: NIC then subnet) ().
- Stateful with priority-based rules (100-4096); augmented rules allow multiple IPs/ports per rule (Resource Manager only).
- Default rules allow VNet/LB/Internet out; service tags like VirtualNetwork.
- No direct port-level only like OpenStack; subnet-level affects all instances.
▸DigitalOcean·Cloud Firewalls
Cloud Firewalls
- Application model: DigitalOcean firewalls are applied to Droplets via `droplet_ids` and/or tags, whereas OpenStack security groups are typically attached to Neutron ports (VM NICs) and can vary per port ().
- Rule model includes both inbound and outbound rules and notes that if none are configured then no traffic is permitted in that direction; OpenStack security groups also support egress rules but many deployments default to allow-all egress—migrating users may need to explicitly model egress restrictions in DigitalOcean if they rely on different defaults ().
- Aggregation semantics: DigitalOcean states that when multiple cloud firewalls apply to a Droplet, rules are additive (“union of the rules”) and a more permissive rule in any firewall effectively opens access; OpenStack security groups are also generally additive, but users migrating from “deny-by-default with explicit groups” patterns may be surprised by how quickly access broadens when stacking policies ().
- Target/source object types differ: DigitalOcean allows sources/destinations to include load balancers (by UID) and uses constructs like `load_balancer_uids`, `droplet_ids`, `tags`, and CIDRs in rule JSON, whereas OpenStack security group rules typically reference CIDRs and/or remote security group IDs (not load balancer UIDs as a primitive) ().
▸Google Cloud·Firewall Rules
Firewall Rules
- GCP firewall rules are VPC-level with target filtering by network tags or service accounts; OpenStack security groups attach to ports.
- GCP rules are stateful (implied return traffic); OpenStack security groups also stateful but per Neutron port.
- GCP firewall supports priority (0-65535) with explicit deny rules; OpenStack security groups are allow-only (implicit deny).
- GCP hierarchical firewall policies apply org/folder-wide; OpenStack has no equivalent scope.
▸Hetzner·hcloud_firewall
Firewalls
- Applies only to Cloud Servers (not Load Balancers), up to 5/server, 500 rules max; free ().
- Default: inbound blocked, outbound allowed; uses label selectors for auto-apply; statefulness not specified but likely stateless given rules ().
- No per-port/per-network granularity like Neutron SG rules; connection limits (80k concurrent/server) ().
- Custom Hetzner API vs Neutron security-groups API.
Security groups
The Network service (OpenStack Neutron) implements security groups as stateful packet filters attached to instance ports. Each rule describes allowed traffic by direction (ingress or egress), IP protocol, optional port range, and remote address range in CIDR form (or by reference to another security group). They are the first place you express "who may SSH here" or "this tier may talk to the database on 5432."
Security groups attach rules to each port, so they track the network boundary closest to the workload without requiring a separate hardware firewall per VM.
What security groups do#
They combine into a virtual firewall around NICs. Ingress rules gate inbound connections; egress rules gate outbound. Stateful behavior means that when you allow a flow in one direction, return packets for established connections match the state table and are permitted without mirror micro-rules for ephemeral client ports.
ICMP "echo" for ping, traceroute-related types, and application protocols all use the same rule machinery; if you need ping for debugging, expose it explicitly instead of assuming defaults include it.
New instances typically land in a default security group whose baseline allows inbound from other members of that same group and outbound toward broad destinations. That default supports bootstrapping and traffic between instances in the same group; production systems add explicit ingress from reverse proxies or bastions only, and sometimes constrain egress to required endpoints for compliance.
You can attach multiple groups to one instance so web, admin, and compliance rules compose. One group can also span many instances when you treat a tier as a role.
How rules are evaluated#
Rules are allow lists: traffic must match an explicit permit. OpenStack evaluates security group rules as a set of permits (there is no separate "deny rule" row in the classic model; absence of allow means drop). Direction, protocol, ports, and remote prefixes must align for a packet to pass.
Because evaluation is stateful, short-lived responses to permitted client sessions return even if egress rules are narrower than you might expect for arbitrary UDP or TCP; still validate your egress policy against compliance needs.
Changing policy safely#
Updates apply immediately to every port using that security group, so a broad change can open or close many instances at once. Immediate propagation helps incident response and amplifies mistakes; prefer narrow ranges, change windows, and infrastructure-as-code review for shared groups.
Interaction with ports and floating IPs#
Security groups bind to ports on each NIC. If an instance has multiple NICs, each port can carry a different combination of groups; your database NIC might be far more restricted than a management NIC. Floating IP NAT resolves to the private address first; security groups then evaluate the permitted flows on that instance port.
Practices that keep environments defensible#
Apply least privilege: allow only the protocols and sources you need; default-deny is implicit where no rule matches. Segment by role (web, application, data) so a compromise in one group does not imply carte blanche elsewhere. Audit rules periodically as applications evolve. Pair filters with logging and monitoring (where the platform exposes them) to spot unexpected connection attempts.
Prefer referencing another security group as a source when tiers scale: "application servers may reach the database security group on 5432" stays correct when you add instances without editing CIDRs.
Further reading#
On this platform:
- Create a security group: step-by-step setup via Console, CLI, and API
- Create security group rules: add ingress and egress rules
- Security groups console: console reference for security group management
- Security groups CLI reference: all
openstack security groupcommands
External resources:
- OpenStack Neutron security group documentation: upstream implementation details and admin configuration
- CIS Benchmarks: industry-standard hardening baselines for Linux instances
- NIST SP 800-123: Guide to General Server Security: vendor-neutral firewall and access control principles
Related content
Pages
How-tos
How to connect to a database on a private network
Databases
How to Deploy a Containerized Application with Docker Compose on a Quake AI VM
Compute
How to self-host a CI server on a VM
Automation
How to self-host authoritative DNS on Quake AI
Network
How to set up a site-to-site or remote-access VPN to Quake AI
Network
Tutorials
Automate your infrastructure with OpenTofu
Automation
Deploy a containerized web application
Compute
Deploy a database sandbox
Compute
Deploy an API service
Compute
Deploy OpenClaw on Quake AI
Compute
Get started with Infrastructure as Code on Quake AI
Automation
Host a static website on Quake AI
Compute
Launch your first server
Platform
Explanations
Overviews
migration
Migrate a Docker container app from AWS to Quake AI
Compute
Migrate from AWS VPC to Quake AI
Network
Migrate from Azure VNet to Quake AI
Network
Migrate from DigitalOcean VPC to Quake AI
Network
Migrate from GCP VPC to Quake AI
Network
Migrate from Hetzner Cloud Networks to Quake AI
Network
Migrate from Linode VPC and Cloud Firewall to Quake AI
Network
Migrate from Vultr VPC 2.0 and Firewall Groups to Quake AI
Network
Migrating from AWS to Quake AI
Platform
Migrating from Azure to Quake AI
Platform
Migrating from DigitalOcean to Quake AI
Platform
Migrating from GCP to Quake AI
Platform
Migrating from Hetzner Cloud to Quake AI
Platform
Migrating from Linode (Akamai Cloud Computing) to Quake AI
Platform
Migrating from Vultr to Quake AI
Platform
Network Migration Guides
Network
deployment
Build a private network with two virtual machines
Network
Deploy a bursty-GPU control plane with a queue and workers
Compute
Deploy a private container registry with OpenTofu
Automation
Deploy a Redis or Valkey cache with the redis-cache template
Automation
Deploy a regional edge cache with the edge-cache template
Automation
Deploy a self-hosted CI runner
Compute
Deploy a self-hosted git forge and CI with OpenTofu
Automation
Deploy an API gateway with the api-gateway template
Automation
Deploy an edge reverse proxy with the edge-reverse-proxy template
Automation
Deploy an edge tunnel gateway with the edge-tunnel-gateway template
Automation
Deploy an edge WAF with the edge-waf template
Automation
Deploy an inference gateway with OpenTofu
Automation
Deploy edge functions with the edge-functions template
Automation
Deploy self-hosted Supabase with Docker Compose
Compute
Deploy the development environment template with OpenTofu
Automation
Deploy the full-stack application template with OpenTofu
Automation
Deploy the monitoring stack template with OpenTofu
Automation
Deploy the MySQL/MariaDB database template with OpenTofu
Automation
Deploy the private network + VPN template with OpenTofu
Automation
Deploy the self-managed PostgreSQL template with OpenTofu
Automation
Deploy the Simple VM template with OpenTofu
Automation
Deploy the three-tier application template with OpenTofu
Automation
Deploy the WordPress + MySQL template with OpenTofu
Automation
Set up a Minecraft server
Compute
Templates
Airbyte ingestion (ELT)
→Apache Airflow orchestration
→Apache Superset BI
→API gateway
→Appsmith internal tools
→Cal.com scheduling
→ClickHouse analytical column store
→Containerized App on Compute
→Coolify host
→CPU render-farm worker pool
→Development Environment
→Edge cache
→Edge functions
→Edge reverse proxy
→Edge tunnel gateway
→Edge web application firewall appliance
→Excalidraw whiteboard
→Feast feature store
→Forgejo Git and CI
→Full-Stack Application
→Harbor registry
→Heat Simple Stack
→Inference gateway
→Infisical secrets management
→JupyterHub notebook server
→Kubernetes Cluster Bootstrap
→Live RTMP/SRT ingest and restream
→Mattermost team chat
→Metabase BI dashboards
→MinIO + Apache Iceberg lakehouse
→MLflow experiment tracking
→Monitoring Stack (Prometheus + Grafana)
→MySQL/MariaDB Database
→n8n workflow automation
→Next.js App on Compute
→Nextcloud files and collaboration
→Outline team knowledge base
→Plane project management
→Private Network + VPN
→Qdrant vector database
→Redis / Valkey cache
→Redpanda Kafka-API streaming
→Selenium Grid testing
→Self-hosted error telemetry (GlitchTip)
→Self-hosted OIDC identity provider (Keycloak)
→Self-Managed PostgreSQL
→Simple VM with Floating IP
→Streamlit data-app host
→Supabase self-host stack
→Three-Tier Application
→Trino federated query engine
→Umami self-hosted analytics
→Unleash feature flags
→Uptime Kuma status and monitoring
→WordPress + MySQL on Compute
→Troubleshooting
- Instance connectivity failure Instance connectivity troubleshooting →