List Cloud Load Balancer Source IP Addresses
Finding and listing the source IPs for your Cloud Load Balancer
If your environment sits behind a strictly managed firewall you may need to find the specific source IP addresses that your Cloud Load Balancer is sending traffic from to your VMs. In order to find this information for your Load Balancer(s), you can use an API call.
API Call
The API call shown below has the following placeholders that need to be replaced with your own:
- TOKEN - Your API Token, obtained when you authenticate with a valid user and API Key to our Identity endpoint .
- REGION - The region that your Load Balancer resides in (ex: DFW)
- TENANT_ID - Your cloud account number.
- LB_ID - The ID of the Cloud Load Balancer.
curl -sH "X-Auth-Token: ${TOKEN}" https\://${REGION}.loadbalancers.api.rackspacecloud.com/v1.0/${TENANT_ID}/loadbalancers/${LB_ID}/clustersourceaddresses | python -m json.tool
After running this API call you can expect output like the below:
curl -sH "X-Auth-Token: ${TOKEN}" https\://${REGION}.loadbalancers.api.rackspacecloud.com/v1.0/${TENANT_ID}/loadbalancers/${LB_ID}/clustersourceaddresses | python -m json.tool
{
"ipv4Publicnets": [
"123.456.789.1",
"123.456.789.2",
"123.456.789.3",
"123.456.789.4",
"123.456.789.5"
],
"ipv4Servicenets": [
"10.123.456.1",
"10.123.456.2",
"10.123.456.3",
"10.123.456.4",
"10.123.456.5"
],
"ipv6Publicnets": [
"2001:1234:7901::4/64",
"2001:1234:7901::5/64",
"2001:1234:7901::6/64",
"2001:1234:7901::7/64",
"2001:1234:7901::13/64"
]
}
You can now white list these IPs or ranges to allow them through your firewall.
Updated about 15 hours ago