Configuring security groups
Security groups and Managed Service for GitLab instance access restrictions
Security group rules determine the following:
- IP addresses that can access the instance, including web access.
- Protocol for working with Git repositories in the GitLab instance: SSH or HTTPS.
- Certificate for HTTPS: Let's Encrypt
(default) or your own certificate . - Whether or not access to GitLab Container Registry
is provided.
Warning
The security group's setup determines the Managed Service for GitLab instance performance and availability.
To set up a security group for a Managed Service for GitLab instance:
- Add rules for incoming and outgoing traffic to an existing security group or create a new group with such rules.
- Apply the security group to the GitLab instance when creating or updating it.
If you do not assign a separate security group to your instance, the default security group of its network will apply. The rules of this security group added for other services affect access to the GitLab instance.
If you have issues with setting up a security group, contact support
Rules for incoming traffic
|
Rule purpose |
Rule settings |
|
For accessing Git repositories over SSH |
|
|
For accessing Git repositories over HTTPS. |
|
|
For enabling Let’s Encrypt certificate. This certificate is used by default |
|
|
For creating instance backups. |
|
|
For health checks by a network load balancer |
|
|
For connecting to GitLab Container Registry. |
|
Rules for outgoing traffic
Managed Service for GitLab relies on third-party integrations. If you limit the outgoing traffic in the instance's security group, the instance may work incorrectly. To avoid this, add the following rules to the security group:
|
Rule purpose |
Rule settings |
|
For enabling Let’s Encrypt certificate. |
|
|
For creating instance backups. |
|
|
For requests to the metadata service when updating an instance. |
|
|
For requests to the DNS service. |
|
|
For requests to NTP servers to support two-factor authentication. |
|
|
For accessing workers managed by a runner created via the management console. |
|
Security groups for a managed runner
To set up networking between GitLab and managed runners, you need to configure required, recommended, and optional security group settings.
Rules for incoming traffic
|
Rule purpose |
Rule settings |
|
To manage the runner from the GitLab instance over SSH. |
|
Rules for outgoing traffic
|
Rule purpose |
Rule settings |
|
To access the GitLab instance's public address over HTTPS, e.g., for cloning repositories or downloading artifacts. |
|
|
To access the artifact registry, e.g., Cloud Registry or dockerhub.io. |
|
|
To access object storages, e.g., LFS or Container Registry. |
|
|
To access external resources. |
|