Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
/ o365-iptables Public archive

Generates iptables rules allowing 25/tcp from o365 published IP space

License

Notifications You must be signed in to change notification settings

mstyne/o365-iptables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

o365-iptables

Office 365 network IP Addresses and URLs are no longer available in XML format. You should transition to accessing the data in JSON format as described at http://aka.ms/ipurlblog.
This was first announced on 2 April 2018 and the XML file was last updated on 22 September 2018.

Microsoft publishes its IP address listings for various services here:

https://support.content.office.net/en-us/static/O365IPAddresses.xml

Using this list, I can generate iptables firewall rules to only allow incoming SMTP traffic from Microsoft, and hopefully keep my ruleset updated automatically when they change things.

I'm using the XPath support in xml.etree.ElementTree, and I experimented until I got what I wanted, so it's possible there's a better way.

I wrote this (badly?) in Python because hey, who doesn't want to learn how to mangle XML in another language?

About

Generates iptables rules allowing 25/tcp from o365 published IP space

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages