Firewall Ports for Office 365

I have been asked many times for the port information and tried many ways to try and portray this in a manner which is simple to understand. For further URL’s IP’s please review the following Microsoft information – https://support.office.com/en-us/article/Office-365-URLs-and-IP-address-ranges-8548a211-3fe7-47cb-abb1-355ea5aa88a2?ui=en-US&rs=en-US&ad=US#BKMK_Portal-identity. I will maintain the separate workloads from this blog but it sometimes it is not always kept up to date 100%!

Server/Service Port Protocol Direction
ADFS   (Internal) 443 TCP Inbound/Outbound
ADFS (Proxy DMZ) or WAP Server 443 TCP Inbound/Outbound
Microsoft Online Portal (Website) 443 TCP Inbound/Outbound
Outlook Web Access (Website) 443 TCP Inbound/Outbound
Lync/Skype for Business Client 443 TCP Inbound/Outbound
SharePoint Online (Website) 443 TCP Inbound/Outbound
Outlook for Mac 443 TCP Inbound/Outbound
Outlook Client 443 TCP Inbound/Outbound
Mail Routing 25 TCP Inbound/Outbound
SMTP Relay (requires TLS) 587 TCP Inbound/Outbound
Simple IMAP4 migration Tool 143/993 TCP Inbound/Outbound
POP3 (requires SSL) 995 TCP Inbound/Outbound
DirSync/Azure Active Directory Connect 80/443 TCP Inbound/Outbound
Exchange Migration Tool 80/443 TCP Inbound/Outbound
IMAP Migration Tool 80/443 TCP Inbound/Outbound
Exchange Management Console 80/443 TCP Inbound/Outbound
Exchange Management Shell 80/443 TCP Inbound/Outbound
SfB (Data Sharing Sessions) 443 TCP Outbound
SfB (Video, Audio, Application Sharing) 443 TCP Outbound
SfB (Audio & Video) 3478 UDP Outbound
SfB (Audio & Video) 50000-59999 TCP/UDP Outbound
SfB/Lync Mobile Push iOS Only 5223 TCP Outbound

It should be noted that 3rd party certificate revocation will be required which is carried out normally anonymously on port 80 so any proxies/firewalls routing the traffic should expect this. Depending on your provider you may be able to get the CRL URL in advance but for Office 365 this is not as simple.

Advertisements

6 thoughts on “Firewall Ports for Office 365

    • For Lync Online logon is TCP 443 and not 5061.
      The MS portal website requires a stateful bi-directional firewall rule (443) to allow traffic to flow freely between the client and the portal.

  1. Hi There,

    Maybe you can help me. I’ve logged a support call with MS and got nothing back and posted on the MS forum with no positive feedback.

    I’m trying to connect to Exchange Online using the EMC but it’s just not working. I keep getting an error saying “The attempt to connect to https://ps.outlook.com/Poershell/Powershell.htm using “Basic authentication failed……..”

    I have NO on-premise exchange but I have successfully installed the EMC (ran schema and AD updates etc). I connect to the internet via a proxy and although I have federation in place I am using a non-federated account (as suggested by a forum member) to authenticate with the EMC.

    The correct firewall ports are open as I can successfully connect to Exchange online from the same server with PS using the same credentials that I use with the EMC. Which seems strange as the EMC is just a GUI to push PS commands out.

    Any ideas?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s