Dynamically get all Twitter IPs


#1

I’m developing a captive portal to allow login with Twitter. The problem I’ve run in to is since it’s a captive portal, I have to whitelist all necessary IP addresses to allow access to Twitter before a user authenticates and can get to other websites. Does anyone know of a way to dynamically get all IP addresses so I can at least do something with them. The user base is global so ideally, I would need a script that can pull this data on a schedule, or worst case scenario, manually at the location where the portal is located, then update the IPs. I can’t whitelist domains, unfortunately, as that would be the ideal scenario. Anyone have any ideas?