---
title: "Creating and configuring a security group in Horizon"
description: "Learn how to create a security group in Horizon and configure it on a Public Cloud instance."
url: https://docs.us.ovhcloud.com/en/public-cloud/compute/setup-security-group
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Creating and configuring a security group in Horizon

**Learn how to create a security group in Horizon and configure it on a Public Cloud instance.**

For security reasons, you can configure and use filtering rules that will define access to your instances. You can allow or block certain incoming or outgoing connections using security groups. You can apply these rules to traffic from specific IP addresses, or to instances in particular security groups.

 

## Requirements

- A [Public Cloud project](https://us.ovhcloud.com/public-cloud/)
- Access to the [Horizon interface](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/create-and-delete-a-user.md)

 

## Instructions

### Creating a security group

Access the [Horizon interface](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/create-and-delete-a-user.md). Then choose the region in which you want to create a security group, via the button in the top left-hand corner.

**Note:**

If a security group is to be used in several regions, you must create it for each region.

Now, expand the `Network` menu and click `Security Groups`.

A table lists the security groups created. The default group is already listed here and allows all traffic through.

**Important:**

**WARNING: Please do not modify or delete the "default" group. You will need to create a new security group and configure your rules in it.**\
Automated tasks on the infrastructure can reset the default security group, so it is important not to change it.\
OpenStack closes all access to instances by default. If you delete the "default" security group, you will need to create your own group, which will open access to your instances, and apply it every time you create an instance. In addition, the default group will be created again later by the automated tasks on the infrastructure.

To add a new security group, click the `+ Create Security Group` button.

On the page that appears, give a name and description to the group you are about to create. Once you have done this, click the `Create Security Group` button.

Returning to the `Security Groups` dashboard, the table now displays the newly created group. The default rules allow only outgoing traffic.

To modify them, go to the next step.

If you are satisfied with these rules, go to [Configure a security group on your instance](#configuring-a-security-group-on-an-instance).

 

### Configuring security group rules

Click the `Manage Rules` button.

If you kept the default rules, they only allow outgoing traffic.

```
root@server:~$ ssh admin@149.xxx.xxx.177

ssh connect to host 149.xxx.xxx.177 port 22: Connection timed out
```

On the rules management page, you can:

- delete an existing rule: use the `Delete Rule` button.
- add a new rule: use the `+ Add Rule` button.

When you add a rule, fill in the requested information, then click `Add`.

In this example, we will authorize an SSH connection to the instance.

Once you have added the new rule, wait a few minutes for it to take effect.

```
root@server:~$ ssh admin@149.xxx.xxx.177

Last login: Tue Oct 13 13:56:30 2015 from proxy-109-190-254-35.ovh.us
admin@server1:~$
```

 

### Configuring a security group on an instance

From the Horizon interface, expand the `Compute` menu and select `Instances`. From this page, create a new instance via the `Launch Instance` button.

When you create your instance, you can choose the new security group created in the previous step via th&#x65;**&#x20;Security Groups** menu.

You can apply a new security group to an existing instance by clicking `Edit Security Groups` to the right of the instance.

 

### Deleting a security group

To delete a security group, select it by ticking the corresponding box on the left, then click `Delete Security Groups`.

 

## Go further

Browse all the [Compute guides](https://docs.us.ovhcloud.com/en/public-cloud/compute/landing-page-compute.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Public Cloud Compute](https://us.ovhcloud.com/public-cloud/compute/) on the OVHcloud US website.
