Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for GitLab
  • Getting started
    • All guides
    • Getting information about instances
    • Creating and activating an instance
    • Setting up security groups and access restrictions to an instance
    • Stopping and starting an instance
    • Editing instance settings
    • Managing backups
    • Migrating from a custom GitLab installation
    • Migrating to a different availability zone
    • Cleaning up full disk space
    • Deleting an instance
    • Adding and removing users from a project
    • Setting up approval rules
    • Monitoring the instance status
    • Setting up OmniAuth
  • Access management
  • Pricing policy
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Rules for incoming traffic
  • Rules for outgoing traffic
  1. Step-by-step guides
  2. Setting up security groups and access restrictions to an instance

Setting up security groups and access restrictions to a Managed Service for GitLab instance

Written by
Yandex Cloud
Updated at April 10, 2025
  • Rules for incoming traffic
  • Rules for outgoing traffic

Security group rules determine the following:

  • IPs that can access the instance, including web access.
  • Protocol to work 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.

To set traffic rules for a GitLab instance:

  1. Create a security group in the Yandex Cloud network you selected when creating the instance.

  2. Add inbound and outbound traffic rules to the security groups. See the list of rules further below.

  3. Contact support to bind a security group to a GitLab instance.

    If you do not bind a separate security group to an instance, the group created by default in the instance's network will apply to it. The rules of this security group added for other services affect access to the GitLab instance.

    If you have no access to the instance or it works incorrectly when using the default security group, add rules for GitLab to this group or bind a new one.

Rules for incoming trafficRules for incoming traffic

Why the rule is required

Rule settings

To access Git repositories over SSH.

  • Port range: 22 and 2222. Create a separate rule for each port.

  • Protocol: TCP.

  • Source: CIDR.

  • CIDR blocks: To provide access, specify subnet IP ranges within Yandex Cloud or public IP addresses of web-connected computers. Examples:

    • 172.16.0.0/12
    • 85.32.32.22/32

    To allow all traffic from any IP, specify 0.0.0.0/0.

To access Git repositories over HTTPS.

  • Port range: 443
  • Protocol: TCP
  • Source: CIDR
  • CIDR blocks: To provide access, specify subnet IP ranges within Yandex Cloud or public IP addresses of web-connected computers.

To enable Let’s Encrypt certificate.

This certificate is used by default when using Git repositories over HTTPS. If you do not specify this rule, add your own certificate to work over HTTPS.

  • Port range: 80 and 443. Create a separate rule for each port.
  • Protocol: TCP
  • Source: CIDR
  • CIDR blocks: 0.0.0.0/0

For creating instance backups

  • Port range: 443
  • Protocol: TCP
  • Source: CIDR
  • CIDR blocks: 213.180.193.243/32

For health checks by a network load balancer.

  • Port range: 80
  • Protocol: TCP
  • Source: Load balancer healthchecks

To connect to GitLab Container Registry.

  • Port range: 5050

  • Protocol: TCP

  • Source: CIDR

  • CIDR blocks: To provide access, specify subnet IP ranges within Yandex Cloud or public IP addresses of web-connected computers.

    To allow all traffic from any IP, specify 0.0.0.0/0.

Rules for outgoing trafficRules for outgoing traffic

Managed Service for GitLab relies on third-party integrations to provide its services. If you limit the outgoing traffic in the instance's security group, the instance may work incorrectly. To avoid this, add one of the rules presented in the table to the security group. You need them to create backups and store user objects in Yandex Object Storage.

Your choice of rule depends on the certificate you are using: Let's Encrypt (default) or self-signed.

Why the rule is required

Rule settings

To enable Let’s Encrypt certificate

  • Port range: 443
  • Protocol: TCP
  • Source: CIDR
  • CIDR blocks: 0.0.0.0/0

For creating instance backups

  • Port range: 443
  • Protocol: TCP
  • Source: CIDR
  • CIDR blocks: 213.180.193.243/32

For requests to the metadata service when updating an instance.

  • Port range: 80
  • Protocol: TCP
  • Source: CIDR
  • CIDR blocks: 169.254.169.254/32

For requests to the DNS service.

  • Port range: 53

  • Protocol: UDP

  • Source: CIDR

  • CIDR blocks — <second_IP_address_in_subnet>/32. For example, for the 10.128.0.0/24 subnet, this will be the 10.128.0.2/32 CIDR.

    If your subnet has its own DNS server, allow outgoing traffic to it, e.g., DNS_server_IP_address/32.

For requests to NTP servers to support two-factor authentication.

  • Port range: 123
  • Protocol: UDP
  • Source: CIDR
  • CIDR blocks: 0.0.0.0/0

Was the article helpful?

Previous
Creating and activating an instance
Next
Stopping and starting an instance
Yandex project
© 2025 Yandex.Cloud LLC