Security Groups
Security groups control network access to your instances.
Use them to allow only the traffic your application needs.
With an agent (MCP)
Connect the redu MCP, then ask your agent, for example: “let only the app machine reach Postgres on the database machine”. It has the whole set:
| Tool | What it does |
|---|---|
list_security_groups | Your groups, each with its rules |
create_security_group | A new group: all outbound traffic allowed, nothing inbound |
add_security_group_rule | One rule: a port or a range, from an address range or from another of your groups |
delete_security_group_rule | Removes one rule |
set_instance_security_groups | Sets the complete list of groups on one instance |
update_security_group | Renames a group or changes its description |
delete_security_group | Deletes a group no instance uses |
Each tool reports what was actually done, read back from your account. The tools that remove access tell your agent to ask you first. When an instance gets a public URL, redu opens that port for you in the groups the instance has at that moment.
Zero trust between your own instances
Allow your own instances by group, not by address: a rule on the database group that allows port 5432 from the app group lets in only the instances in the app group, wherever their addresses change. Keep 0.0.0.0/0 (the whole internet) for public services only.
1. Create a security group
Go to:
Menu → Network → Security Groups
Then:
- Click Create Group
- Enter a group name, for example
web-frontend - Optionally add a description
- Submit the form
The list shows each group’s name, description, rule count, exposure summary, creation date, and actions. A new group does not allow application traffic until you add the required ingress rules.
2. Add rules
Rules define what traffic is allowed.
Go to:
Menu → Network → Security Groups → Actions → Manage Rules
Then:
- Click Create Rule
- Choose the Ether Type and direction
- Enter the port
- Choose the protocol
- Submit the form
The rules view shows the direction, Ether Type, protocol, port range, source, creation date, and actions for every rule.
Rule options
| Field | Description |
|---|---|
| Direction | ingress for incoming traffic, egress for outgoing traffic |
| EtherType | IPv4 or IPv6 |
| Port | Single port number from 1 to 65535 |
| Protocol | TCP, UDP, TCP & UDP, or All ICMP |
Selecting TCP & UDP creates two rules: one for TCP and one for UDP.
Common rules
| Use case | Direction | Port | Protocol |
|---|---|---|---|
| SSH | ingress | 22 | TCP |
| HTTP | ingress | 80 | TCP |
| HTTPS | ingress | 443 | TCP |
| Custom app | ingress | your app port | TCP or UDP |
3. Delete rules
To remove a rule:
- Open the rules list for the security group
- Open the actions menu for the rule
- Click Delete Rule
Confirm the rule and port before deleting it. The change can immediately interrupt traffic to every instance that uses the group.
4. Attach security groups to instances
When creating an instance, choose one or more groups under Access → Firewall rules.
Rules apply to instances using that group.
To change an existing instance, go to Compute → Virtual Machines, open its Actions menu, and choose Change Security Group.
Best practices
- Open only the ports your application needs
- Allow SSH only when needed
- Prefer specific rules over broad access
- Review unused rules regularly
Troubleshooting
Rule creation fails
Check that:
- Port is between
1and65535 - Required fields are selected
- Duplicate rules are not being created
Cannot connect to an instance
Check that:
- The correct security group is attached
- The rule direction is
ingress - The correct port is allowed
- The instance is running
SSH not working
Check that:
- Port
22is allowed - SSH was enabled during instance creation
- The correct keypair was selected