How do IP restrictions and Login IP Ranges secure Salesforce integration endpoints against unauthorized network access?
Answer
Basics: If an integration's credentials leak, an attacker outside your network could still use them. IP controls add a network condition: the credentials work only from approved addresses, such as your gateway or middleware egress IPs.
How it works:
- Profile Login IP Ranges (Setup > Profiles > Login IP Ranges): a login from an address outside the ranges is denied. They are set on profiles, not permission sets.
- Network Access trusted IP ranges (Setup > Network Access): logins from these addresses are not asked for an identity verification code. They do not block anything else.
- Connected app IP Relaxation: choose "Enforce IP restrictions" (the user's profile ranges apply), "Relax IP restrictions" (profile ranges bypassed for this app) or "Relax IP restrictions with second factor".
- Session Settings can lock sessions to the originating IP and, with "Enforce login IP ranges on every request", apply the ranges throughout the session rather than only at login.
Advanced / deep dive: Use a dedicated integration profile with login IP ranges for the integration's static egress addresses. Cloud middleware often has changing IPs, so use dedicated or static egress, a private network link, or mTLS and certificate auth instead of broad ranges. Login IP ranges work together with login hours and permission sets in a layered, least-privilege design. For outbound calls from Salesforce to your systems, allowlist Salesforce's published IP ranges on your firewall (verify, and note that ranges change and Hyperforce differs). IP restrictions do not replace OAuth scopes, MFA or field-level security.
Code / config example:
Profile: API Integration User
Login IP Ranges: 203.0.113.10 - 203.0.113.20 (gateway egress)
Connected App > Manage > Edit Policies:
Permitted Users: Admin approved users are pre-authorized
IP Relaxation: Enforce IP restrictions
Session Settings: [x] Enforce login IP ranges on every request