I was wondering what the IP Range of outgoing connections the Photon makes to the particle cloud. I know it uses Port 5683 (CoAP) to connect to the AWS Servers with load balancing - but I’m not sure of the exact range that it uses? I’m on a closed educational network, but they cannot unblock the ports globally, but they can unblock certain IP Addresses with ports if they know the destination IPs.
Thanks for getting back to me, I look forward to hearing from @Dave and @BDub too. I contacted Particle, and they have given me the main address (54.208.229.4) ( as well as a fallback address (prior 0.6.0 firmware) (54.225.2.62), but the Photon is connecting to addresses which they have not defined. I believe this is the load balancing on the AWS Servers. All calls from the Photon being picked up on the firewall seem to be port 5683 too.
For the photon, you only need outgoing TCP port 5683 like you mentioned, and for hosts, we don’t have a single fixed IP anymore. We try to keep that host around for legacy devices / old configurations, but these days you can find the server IPs for your geographic region by querying “device.spark.io”.
right now that gives me:
dig device.spark.io
; <<>> DiG 9.8.3-P1 <<>> device.spark.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21375
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;device.spark.io. IN A
;; ANSWER SECTION:
device.spark.io. 60 IN CNAME device.nodes.spark.io.
device.nodes.spark.io. 60 IN A 54.225.2.62
;; AUTHORITY SECTION:
nodes.spark.io. 60 IN NS ns-2025.awsdns-61.co.uk.
nodes.spark.io. 60 IN NS ns-216.awsdns-27.com.
nodes.spark.io. 60 IN NS ns-882.awsdns-46.net.
nodes.spark.io. 60 IN NS ns-1114.awsdns-11.org.
;; ADDITIONAL SECTION:
ns-216.awsdns-27.com. 111848 IN A 205.251.192.216
ns-882.awsdns-46.net. 111858 IN A 205.251.195.114
ns-1114.awsdns-11.org. 111985 IN A 205.251.196.90
ns-2025.awsdns-61.co.uk. 111755 IN A 205.251.199.233
However you should expect that this set of IPs will change from time to time, so the domain is the most accurate way of getting the list.
I still had a few extra IPs to unblock on port 5683, which I will post up on the forum once I have compiled a full list, I believe it is due to load balancing - but I may be wrong.
As a note for educators, on your network, a setting that we found to alleviate some issues was the ‘Block Unknown HTTP Requests’ on LightSpeed Filtering. If you are in this situation, I would recommend finding the MAC Address, assigning a static IP Address and giving the Photon its own filter class within LightSpeed with the Unknown HTTP Requests setting.
I am facing a similar issue in some schools. The IT would like to know a list of IP addresses to allow. Did you end up compiling a list? It would be extremely helpful!
The Particle device cloud is comprised of many servers running in different places around the world. We routinely start and stop servers automatically to meet demand, and during routine maintenance, and it would be difficult to commit to a range of stable IP addresses. Our domain device.spark.io is dynamically updated and regenerated to reflect what local servers are available for devices, and is the best way to get a list of local servers to approve, but it is subject to routine change.
One alternative is to whitelist all Photon devices by MAC address, allowing them to make outgoing TCP connections to port 5683 on any host.
If this is not possible, as of the time of writing this is the list of IP addresses. It is subject to change.
If a new server is added, and is blocked by your firewall, it will time out and try again using a different server, but this will increase the time it takes to connect to the cloud.
You can generate the list yourself by doing a dig of device.nodes.spark.io. You need to wait a minute, I use 65 seconds to be safe, between requests and repeat until you stop getting new addresses. That takes about 20 minutes now but it would take longer as the number of servers is increased. This method works now, but is also subject to change.