How to find the exact Salesforce IP to whitelist

For Jira Server or Data Center, one of the system requirements is to be publicly exposed to the Internet or at least to the Salesforce IPs/domains. Failure to achieve this may cause connectivity issues.

For more information about this issue, please refer to the following documentation:

Finding the exact IP(s) is useful particulary when connecting Salesforce Sandbox, which may not be listed on the Salesforce IPs/domains.

It's important to note that this fix should be implemented by the customer's IT team. However, to provide assistance, we can identify the customer's Salesforce IP to whitelist. This will also help verify if the customer has already whitelisted the correct IP.

 Instructions

In Salesforce:

  1. Add https://api.ipify.org to Remote Site settings.

  2. Run the following code snippet in the developer console:

    1. Http http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('https://api.ipify.org'); req.setMethod('GET'); HttpResponse response = http.send(req); System.debug('STATUS: ' + response.getStatusCode()); System.debug('BODY: ' + response.getBody());
  3. Open the logs and look for DEBUG:BODY.

  4. Whitelist that IP/Check if that IP is in the whitelist.

This process should help identify the customer's Salesforce IP address for whitelisting purposes.