Skip to main content

Security groups

A security group is a set of firewall rules applied to a server's network ports. Traffic matching no rule is dropped. Every rule allows traffic: to open a port, add a rule for it.

A new group allows all outgoing traffic and no incoming traffic. Each project has a default group, which also allows traffic between the servers that use it. A server can use several groups, and their rules add up. To filter the traffic of whole subnets where it passes a router, use firewalls.

Open Networking in the project's sidebar and choose the Security Groups tab.

The project's security groupsThe project's security groups

Create a security group​

  1. Choose Create Security Group.
  2. Choose the Location, and enter a Name and a Description.
  3. Create the group, then add its rules.

You can also create a group while creating a server. The form there offers ready-made rules for SSH, HTTP and HTTPS.

Add a rule​

Open the group and choose Add rule.

FieldChoice
RuleAll Protocols, or Custom Protocol to pick one
DescriptionWhat the rule is for, such as PostgreSQL from the application network
DirectionIngress for traffic to the server, Egress for traffic from it
ProtocolTCP, UDP, ICMP or ICMPv6, for a custom protocol
Open PortOne Port, a Port Range, or All Ports
RemoteA CIDR range the traffic comes from, or another Security group
Ether TypeIPv4 or IPv6
The Add rule dialogThe Add rule dialog

A remote CIDR of 0.0.0.0/0 allows any IPv4 address. Limit it to the addresses that need access, such as your office range for SSH. A remote security group allows traffic from every server in that group, which suits rules between tiers, such as web servers reaching a database.

A security group's rulesA security group's rules

Rule changes apply at once to every server that uses the group. To remove a rule, delete it from the group's list.

Apply a group to a server​

Choose security groups when you create a server, or open the server's Security Groups tab to add or remove groups later. See Manage servers.

Delete a security group​

Remove the group from every server that uses it. Then open the group and delete it.