How to Block and Allow IP Addresses in Exchange Online?

Sometimes you dont receive emails from your Customers or Partners, and then you rush to check the Junk Folder or it can be blocked by your spam filter. At times you can loose the information or miss urgent email, therefore it is important that your friends, customers, partners and trusted buddies are added in your trusted circle. You can do this by contacting your Exchange Administrator, or if you are Exchange Admin then you can apply Connection Filter Rule, so that you can allow emails from trusted source and block from unwanted source like bulk emails or promotional emails.

Very simple, just follow the below steps:

1 – You must have Office 365 subscription which has Exchange Online Plan and you should sign as administrator

2 – Come to the Exchange Online Admin Portal and click Protection, and double click Default, under the connection filter tab.

Exchange Online - Admin Portal
Exchange Online – Admin Portal

3 –  One tenant will have single Connection Filter, after you double click Default below window will open. The name will be Default, lets keep it.

Default - Connection Filter
Default – Connection Filter



4 – Now click the ” Connection Filter” and you will see a whole new screen. In this window we will configure the IP Block list and IP Allow list.

Connection Filter - Block/Allow List
Connection Filter – Block/Allow List


5 –  Now click the ” + ” sign as below:

Adding IP Allow
Adding IP Allow


6 – After clicking the + sign, a new window will open in which you need to input IP address to allow the traffic from that IP, please note you can only input IP. If you try to input domain names, it will not accept it. In case you are wondering where can we get the IPs from?? then no worries, you can check the IPs in the Message Header of the emails (Reference Link: You can find IPs for Trusted and Spam sources – simple!!!!!

Now, you can get the IPs by reading the Message Header.

Add the trusted IP, i have added example IP as, and press Ok.



7 – Now you can see the IP in the list which is allowed IP, emails from this IP will be received. We will add an IP in the IP Block List so that we dont receive emails from this IP address. The process is similar to the IP Allow List. I have added an example IP:

IP Block List
IP Block List



8 –  We can check the Enable safe list box, in which Microsoft subscribes to various third-party sources of trusted senders. Selecting this check box skips spam filtering on messages sent from these senders, ensuring that they are never mistakenly marked as spam.

Enable safe list
Enable safe list

You can check this box and click Save. And this will take you back on the home page of Exchange Online. In this way you can configure the IP Allow and IP Block list using the Connection Filter tab in Protection.

To test this rule send an email to the blocked and allowed IP separately. Blocked IP email should be blocked and allowed IP email should be delivered. Incase you come across any issue please content Microsoft.

stay tuned for more stuff, dont forget to follow my blog for future updates.

One thought on “How to Block and Allow IP Addresses in Exchange Online?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.