--- title: "Create a security group" description: "Create a security group from the MyAccount portal, name it, add inbound and outbound rules, and set it as default if you want to." content_type: "how-to" product: "security-group" platform: "MyAccount" url: "/myaccount/security-group/how-to/create-a-security-group/" topic: ["create"] --- # Create a security group A security group is a name and a set of rules. Once it exists, you can attach it to a node, autoscale group, Kubernetes cluster, load balancer, or database. You can also make it the default for new nodes. ## Before you begin - A MyAccount account. - An idea of the traffic you want to allow, such as SSH from your office or HTTPS from anyone. [Add or edit rules](/myaccount/security-group/how-to/add-or-edit-rules/) explains each part of a rule. ## Create the security group 1. Open **Network > Security Group** and click **Create Security Group**. 2. Enter a **Security Group Name** of up to 50 characters, using letters, digits, underscores, and hyphens. 3. (Optional) Enter a **Description** of up to 256 characters, so you remember what the group is for. 4. Add at least one inbound rule and at least one outbound rule. For each, choose the **Protocol**, the **Port Range**, and the **Source IPv4/Network**. Use **+ Add Inbound Rule** and **+ Add Outbound Rule** for more. 5. (Optional) To use this group for new nodes in this project and region, turn **Make this group default** on. 6. Click **Create Group**. The group appears in the security group list, ready to attach. You can change its name and description later on the group's **Info** tab. The group's rules apply once it is on a resource, so next, [attach it to a node](/myaccount/security-group/how-to/attach-a-security-group-to-a-node/). Each error a rule can get is explained in [Troubleshooting Security Group](/myaccount/security-group/troubleshooting/security-group/).