Skip to main content

Managing allowed IP addresses for your organization

You can restrict access to your organization's private assets by configuring a list of IP addresses that are allowed to connect.

Who can use this feature

Organization owners can manage allowed IP addresses for an organization.

About allowed IP addresses

You can restrict access to private organization assets 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.

Note: Only organizations that use GitHub Enterprise Cloud can use IP allow lists. For more information about how you can try GitHub Enterprise Cloud for free, see "Setting up a trial of GitHub Enterprise Cloud."

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. After you complete your list, you can check whether a particular IP address would be allowed by any of the enabled entries in the list.

You must add your current IP address, or a matching range, before you enable the IP allow list.

If you set up an allow list you can also choose to automatically add to your allow list any IP addresses configured for GitHub Apps that you install in your organization. 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 the organizations in an enterprise account. For more information, see "Enforcing policies for security settings in your enterprise."

Adding an allowed IP address

You can create an IP allow list by adding entries that each contain an IP address or address range. After you finish adding entries, you can check whether a particular IP address would be allowed by any of the enabled entries in your list.

Before the list restricts access to private assets owned by organizations in your enterprise, you must also enable allowed IP addresses.

Note: GitHub is gradually rolling out support for IPv6. As GitHub services continue to add IPv6 support, we will start recognizing IPv6 addresses of GitHub users. To prevent possible access interruptions, please ensure you have added any necessary IPv6 addresses to your IP allow list.

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Your organizations in the profile menu

  2. Next to the organization, click Settings. The settings button

  3. In the "Security" section of the sidebar, click Authentication security.

  4. At the bottom of the "IP allow list" section, enter an IP address, or a range of addresses in CIDR notation. Key field to add IP address

  5. Optionally, enter a description of the allowed IP address or range. Key field to add name for IP address

  6. Click Add. Add allowed ip address button

  7. Optionally, check if a particular IP address would be allowed by any of the enabled entries in your list. For more information, see "Checking if an IP address is permitted."

Enabling allowed IP addresses

After you create an IP allow list, you can enable allowed IP addresses. When you enable allowed IP addresses, GitHub immediately enforces any enabled entries in your IP allow list.

Before you enable allowed IP addresses, you can check whether a particular IP address would be allowed by any of the enabled entries in your list. For more information, see "Checking if an IP address is permitted."

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Your organizations in the profile menu

  2. Next to the organization, click Settings. The settings button

  3. In the "Security" section of the sidebar, click Authentication security.

  4. Under "IP allow list", select Enable IP allow list. Checkbox to allow IP addresses

  5. Click Save.

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 you install in your organization.

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 Enterprise Cloud 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."

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Your organizations in the profile menu

  2. Next to the organization, click Settings. The settings button

  3. In the "Security" section of the sidebar, click Authentication security.

  4. Under "IP allow list", select Enable IP allow list configuration for installed GitHub Apps. Checkbox to allow GitHub App IP addresses

  5. Click Save.

Editing an allowed IP address

You can edit an entry in your IP allow list. If you edit an enabled entry, changes are enforced immediately.

After you finish editing entries, you can check whether a particular IP address would be allowed by any of the enabled entries in your list.

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Your organizations in the profile menu

  2. Next to the organization, click Settings. The settings button

  3. In the "Security" section of the sidebar, click Authentication security.

  4. Under "IP allow list", to the right of the entry you want to edit, click Edit. Edit allowed IP address button

  5. Type an IP address, or range of addresses, in CIDR notation. Key field to add IP address

  6. Type a description of the allowed IP address or range. Key field to add name for IP address

  7. Click Update.

  8. Optionally, check if a particular IP address would be allowed by any of the enabled entries in your list. For more information, see "Checking if an IP address is permitted."

Checking if an IP address is permitted

You can check whether a particular IP address would be allowed by any of the enabled entries in your IP allow list, even if the list is not currently enabled.

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Your organizations in the profile menu

  2. Next to the organization, click Settings. The settings button

  3. In the "Security" section of the sidebar, click Authentication security.

  4. Under "Check your IP address", enter an IP address. Screenshot of the "Check IP address" text field

Deleting an allowed IP address

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Your organizations in the profile menu

  2. Next to the organization, click Settings. The settings button

  3. In the "Security" section of the sidebar, click Authentication security.

  4. Under "IP allow list", to the right of the entry you want to delete, click Delete. Delete allowed IP address button

  5. To permanently delete the entry, click Yes, delete this IP allow list entry. Permanently delete IP allow list entry button

Using GitHub Actions with an IP allow list

Warning: If you use an IP allow list and would also like to use GitHub Actions, you must use self-hosted runners or GitHub-hosted larger runners with a static IP address range. For more information, see "Hosting your own runners" or "Using larger runners".

To allow your self-hosted or larger hosted runners to communicate with GitHub, add the IP address or IP address range of your runners to the IP allow list. For more information, see "Adding an allowed IP address."