Product reference pages are available in English only.
Security

Network Security Groups

What Is It?

Network Security Groups (NSG) provide firewall rules for VMs and network interfaces. Define inbound and outbound rules to control traffic flow based on ports, protocols, IP addresses, and source MAC addresses. Stateful virtual firewall with deny-by-default posture. A VDC can have one optional Default NSG, which every new VM joins automatically, and up to 200 NSGs in total (Default plus Custom) for fine-grained control.

Quick Facts

Aspect Details
Type Stateful virtual firewall
Scope VDC-level (at most one Default NSG per VDC; up to 200 NSGs per VDC in total)
Default NSG Optional, at most one per VDC; every new VM joins it; created with the VDC, it has four predefined rules (all egress allowed, limited ingress)
Rule Types INGRESS (inbound), EGRESS (outbound)
Filtering Source/destination IP (IPv4/IPv6), MAC address, protocol, port ranges
Supported Protocols TCP, UDP, ICMP, and others
Default Policy Deny-by-default (only explicitly allowed traffic passes)
Limits 200 NSGs per VDC, 100 rules per NSG, 10 NSGs per VM/NIC

Rule Capabilities

Feature Description
Bidirectional Controls both inbound and outbound traffic
Stateful Automatically allows return traffic for permitted connections
Fine-grained Filter on IP, MAC, protocol, port ranges with wildcard support
Templates Pre-defined rule sets (Remote Access Linux, Generic Webserver, etc.)
Cloning Copy existing rule sets across data centers or NSGs

What You Can Do

Create Custom NSGs

Build custom NSGs with specific rule sets for different security requirements. Up to 200 NSGs per VDC (including one default and custom NSGs). Define precise firewall policies per workload type or security zone.

Define Firewall Rules

Create ingress and egress rules filtering on source/destination IP (IPv4/IPv6), MAC address, protocol (TCP, UDP, ICMP, GRE), and port ranges. Wildcards supported for MAC addresses (IP addresses use standard notation or CIDR blocks).

Note: Rules are deny-by-default; only traffic explicitly permitted passes through.

Use Rule Templates

Apply pre-defined templates for common configurations including Remote Access Linux, Generic Webserver, and other standard patterns. Accelerate secure deployments with consistent rule sets.

Attach NSGs to Resources

Attach NSGs to individual VMs or NICs for layered security. Every new VM joins the Default NSG if one exists; add custom NSGs for more control. A VM or NIC can belong to up to 10 NSGs. Managed Kubernetes node pool nodes and suspended Cubes cannot be members.

Note: Running NSGs in parallel with NIC-level firewall rules is discouraged due to potential conflicts. NSGs act as bidirectional firewalls that may override NIC rules.

Clone Rule Sets

Copy existing rule sets across data centers or NSGs. Ensures consistency across environments. Simplifies multi-region or multi-VDC deployments.

Manage Default NSG

A Default NSG created with the VDC comes with four predefined rules (allow all IPv4 and IPv6 egress, IPv4 ingress from 10.0.0.0/24, IPv6 ingress from the VDC's /56); a Custom NSG converted to Default keeps only its own rules. Provides ready-to-go baseline security. Can be modified to adjust default behavior for all new VMs.

Best For

Scenario Why It Fits
Multi-tier applications Separate NSGs for web, app, and database tiers with specific ingress/egress rules
Compliance requirements Deny-by-default posture, fine-grained access control, centralized policy management
Development/production separation Different NSGs per environment, clone rule sets for consistency
Public-facing services Precise port and protocol filtering, protect backend resources from unauthorized access
Micro-segmentation Attach multiple NSGs (up to 10) per VM/NIC for layered security policies

Key Considerations

Billing & Costs

  • NSGs and firewall rules do not appear as a line item in the IONOS CLOUD price list.

Limitations

  • Maximum 200 NSGs per VDC
  • Maximum 100 rules per NSG
  • Maximum 10 NSGs per VM or NIC
  • Only one Default NSG per VDC
  • Running NSGs in parallel with NIC-level firewall rules may cause conflicts
  • Rules are deny-by-default (explicit allow required for all traffic)
  • Stateful inspection means return traffic for an allowed connection is automatically allowed

Management Options

  • Data Center Designer (DCD)
  • Network Security Groups window in the DCD (create, view, update, delete NSGs)
  • NSG View & Edit window (create, view, modify, delete rules)
  • Template library for common configurations
  • Cloud API and SDKs
  • Terraform provider