Page 1 of 1

Convert .json Office 365 IP range to address list

Posted: Thu Aug 23, 2018 4:00 pm
by alexvdbaan
Goodafternoon,

I am trying to find a way to automate adress-list creation from the published IP ranges from Microsoft Office 365 services. Microsoft delivers an online json presentation that can also be downloaded.

Was hoping that one of you might have some script or solution for this?

Thanks, Alex

Re: Convert .json Office 365 IP range to address list

Posted: Thu Aug 23, 2018 5:25 pm
by IntrusDave
After a quick glance, I would say that you can do this with awk/gawk in a bash script, or if you wanted to get fancy in php.
I was actually looking at this same json to be used for whitelisting office365 in my Blacklist service.

I need to earn some money today so I'll be our doing uber & lyft for a few hours. When I get back in, I'll see if I can put together a script for this.

Re: Convert .json Office 365 IP range to address list

Posted: Thu Aug 23, 2018 10:03 pm
by alexvdbaan
When I get back in, I'll see if I can put together a script for this.
That would be great, thanks in advance.

Re: Convert .json Office 365 IP range to address list

Posted: Wed Mar 20, 2019 9:38 am
by CateFul
I wrote this script for split-routing of office 365 traffic.

https://github.com/fillorkill/o365addrlist

tested on python 2.x on CentOS

it generates a conf file to be used with dnsmasq for office 365 urls and a mikrotik address list file.

ipv4 endpoints only

usage:
python parser.py