Gmail IPv4 Addresses for Whitelisting on Exchange

I needed to parse Google’s Gmail spf records in order to configure my Edge Transport server’s IPAllowListEntry, so I figured I’d post it so you didn’t have to go through the trouble.

If you’re wondering, nslookup the following to get the spf records:

nslookup -q=TXT

nslookup -q=TXT

nslookup -q=TXT


This returns the TXT record, which you then can edit out the blocks below, which I’ve done for you.  netblocks2 is what appears to be all of the IPv6 address blocks, but I didn’t bother with those for my environment.  The task is pretty much the same for IPv4 or 6:  get the record, delete the bad data and preserve the blocks, script that into Exchange via CSV and the Add-IPAllowListEntry -IPRange subnet and you should be good to go!

This list is current as of 2016-06-15.


I restarted my transport services for good measure (in Exchange Shell):

Restart-Service MSExchangeTransport

Happy emailing!


This entry was posted in Exchange, Firewall, GMail, Google, Rules and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *