URL
https://cdnsun.com/api/locations/ips
Method
GET
Curl example
curl -i -X GET -u username:password -H 'Accept: application/json' -H 'Content-type: application/json' --url 'https://cdnsun.com/api/locations/ips'
Note
Returns a JSON array of current IP ranges of all our CDN Locations. Example: ["1.1.1.0\/24","2.2.2.0\/24"].
Please be aware that the list of IP ranges changes over time, e.g. we add new CDN edge servers. If you are using the IP ranges list for firewall whitelist on your origin(s) then you are supposed to periodically check for changes in the IP ranges list (e.g. calculate an md5 hash of the JSON array) and if necessary then update your firewall whitelist.
Iptables example whitelisting 1.1.1.0/24 and 2.2.2.0/24 and rejecting others on TCP ports 80 (HTTP) and 443 (HTTPS):
iptables -A INPUT -s 1.1.1.0/24 -p tcp -m multiport --dports 80,443 -j ACCEPT iptables -A INPUT -s 2.2.2.0/24 -p tcp -m multiport --dports 80,443 -j ACCEPT iptables -A INPUT -p tcp -m multiport --dports 80,443 -j REJECT
Please note that the IP ranges list is available only to paying customers, it is not available to free trial accounts.