About IP allow lists
By default, authorized users can access your enterprise from any IP address. Enterprise owners can restrict access to assets owned by organizations in an enterprise account by configuring an allow list for specific IP addresses. For example, you can allow access from only the IP address of your office network. The allow list for IP addresses will block access to private resources via the web, API, and Git from any IP addresses that are not on the allow list.
You can approve access for a single IP address, or a range of addresses, using CIDR notation. For more information, see "CIDR notation" on Wikipedia.
To enforce the IP allow list, you must first add IP addresses to the list, then enable the IP allow list. You must add your current IP address, or a matching range, before you enable the IP allow list. When you enable the allow list, the IP addresses you have configured are immediately added to the allow lists of organizations in your enterprise. If you disable the allow list, the addresses are removed from the organization allow lists.
You can choose to automatically add to your allow list any IP addresses configured for GitHub Apps installed in your enterprise. The creator of a GitHub App can configure an allow list for their application, specifying the IP addresses at which the application runs. By inheriting their allow list into yours, you avoid connection requests from the application being refused. For more information, see "Allowing access by GitHub Apps."
You can also configure allowed IP addresses for an individual organization. For more information, see "Managing allowed IP addresses for your organization."
By default, Azure network security group (NSG) rules leave all inbound traffic open on ports 22, 80, 443, and 25. Enterprise owners can contact GitHub Support to configure access restrictions for your instance.
For instance-level restrictions using Azure NSGs, contact GitHub Support with the IP addresses that should be allowed to access your enterprise instance. Specify address ranges using the standard CIDR (Classless Inter-Domain Routing) format. GitHub Support will configure the appropriate firewall rules for your enterprise to restrict network access over HTTP, SSH, HTTPS, and SMTP. For more information, see "Receiving help from GitHub Support."
Adding an allowed IP address
-
In the top-right corner of GitHub AE, click your profile photo, then click Enterprise settings.
-
In the enterprise account sidebar, click Settings.
-
In the left sidebar, click Security.
-
At the bottom of the "IP allow list" section, enter an IP address, or a range of addresses in CIDR notation.
-
Optionally, enter a description of the allowed IP address or range.
-
Click Add.
Allowing access by GitHub Apps
If you're using an allow list, you can also choose to automatically add to your allow list any IP addresses configured for GitHub Apps that are installed in your enterprise.
If you select Enable IP allow list configuration for installed GitHub Apps in your allow list settings, then IP addresses from installed GitHub Apps are added to your allow list. This happens irrespective of whether your allow list is currently enabled. If you install a GitHub App and then the creator of that application changes the addresses in its allow list, your allow list is automatically updated with those changes.
You can identify the IP addresses that have been automatically added from GitHub Apps by reviewing the description field. The description for these IP addresses is: "Managed by the NAME GitHub App." Unlike addresses you add manually, you cannot edit, delete, or disable IP addresses that are automatically added from GitHub Apps.
Note: The addresses in the IP allow list of a GitHub App only affect requests made by installations of the GitHub App. The automatic addition of a GitHub App's IP address to an organization's allow list does not allow access to a GitHub AE user who connects from that IP address.
For more information about how to create an allow list for a GitHub App you have created, see "Managing allowed IP addresses for a GitHub App."
To enable automatic addition of IP addresses for GitHub Apps:
-
In the top-right corner of GitHub AE, click your profile photo, then click Enterprise settings.
-
In the enterprise account sidebar, click Settings.
-
In the left sidebar, click Security.
-
Under "IP allow list", select Enable IP allow list configuration for installed GitHub Apps.
-
Click Save.
Enabling allowed IP addresses
-
In the top-right corner of GitHub AE, click your profile photo, then click Enterprise settings.
-
In the enterprise account sidebar, click Settings.
-
In the left sidebar, click Security.
-
Under "IP allow list", select Enable IP allow list.
-
Click Save.
Editing an allowed IP address
-
In the top-right corner of GitHub AE, click your profile photo, then click Enterprise settings.
-
In the enterprise account sidebar, click Settings.
-
In the left sidebar, click Security.
-
Under "IP allow list", to the right of the entry you want to edit, click Edit.
-
Type an IP address, or range of addresses, in CIDR notation.
-
Type a description of the allowed IP address or range.
-
Click Update.
Deleting an allowed IP address
-
In the top-right corner of GitHub AE, click your profile photo, then click Enterprise settings.
-
In the enterprise account sidebar, click Settings.
-
In the left sidebar, click Security.
-
Under "IP allow list", to the right of the entry you want to delete, click Delete.
-
To permanently delete the entry, click Yes, delete this IP allow list entry.
Using GitHub Actions with an IP allow list
To allow your self-hosted runners to communicate with GitHub, add the IP address or IP address range of your self-hosted runners to the IP allow list. For more information, see "Adding an allowed IP address."