Whitelist All IPs in Salesforce

How to Whitelist All IPs in Salesforce?

In the Network Access under Security Controls you might have seen this:

"The list below contains IP address ranges from sources that your organization trusts. Users logging in to salesforce.com with a browser from trusted networks are allowed to access salesforce.com without having to activate their computers." [1]

All of us face the same issue of how we can enable all IPs in our organization. Every time you share the credentials with anyone you've to whitelist their IP so they can log in without sending any security code to emails.

In order to overcome it you simply need to create a home page component (custom link) and use this code there:

r_687289_KTsZs
var startingPoint = 0;
var endpoint = 0;
openPage(); 
function openPage() {
    endpoint = startingPoint + 1; 
    var win = window.open('https://ap2.salesforce.com/05G/e?IpStartAddress=' + startingPoint + '.0.0.0&IpEndAddress=' + endpoint + '.    255.255.255&isdtp=vw',600,600);
    win.onload = function() { 
        win.document.getElementsByName('save')[0].click();
        win.onunload = function() {
            win.close();
            startingPoint = startingPoint + 2;
            if(startingPoint <= 255) {
                openPage();
            }
        }
    }
}

Use this custom link on the Home page layout. Make sure your browser is allowing the pop-ups as once you click on this link just sit back and relax as it will continuously call the page and add IPs to your Org.

****Note: Replace "https://ap2.salesforce.com" with the base URL of your Org. Rest URL remain as is "/05G/e?IpStartAddress=' + startingPoint + '.0.0.0&IpEndAddress=' + endpoint + '.255.255.255&isdtp=vw',600,600"

images

Cheers!!

Reference:
https://classic.certifiedondemand.com/salesforce-login-methods-process/

Popular Salesforce Blogs