Creating an Inbound Connector for Office 365 to Symantec Cloud IP ranges CIDR

To allow connections only from Symantec Cloud IPs within Office 365 – Exchange Online you will need to create an Inbound Connector that is restricted to Symantec.Cloud IPs (http://images.messagelabs.com/EmailResources/ImplementationGuides/Subnet_IP.pdf )
Note: Office 365 only allows CIDR from 24 to 32 to be entered within the sender IP scope in Send Connectors.  Table 1.1 below are Symantec Cloud IP ranges converted to /24
Table 1.1 Symantec Cloud IP ranges converted to /24.
216.82.240.0/24
216.82.241.0/24
216.82.242.0/24
216.82.243.0/24
216.82.244.0/24
216.82.245.0/24
216.82.246.0/24
216.82.247.0/24
216.82.248.0/24
216.82.249.0/24
216.82.250.0/24
216.82.251.0/24
216.82.252.0/24
216.82.253.0/24
216.82.254.0/24
216.82.255.0/24
85.158.136.0/24
85.158.137.0/24
85.158.138.0/24
85.158.139.0/24
85.158.140.0/24
85.158.141.0/24
85.158.142.0/24
85.158.143.0/24
67.219.240.0/24
67.219.241.0/24
67.219.242.0/24
67.219.243.0/24
67.219.244.0/24
67.219.245.0/24
67.219.246.0/24
67.219.247.0/24
67.219.248.0/24
67.219.249.0/24
67.219.250.0/24
67.219.251.0/24
67.219.252.0/24
67.219.253.0/24
67.219.254.0/24
67.219.255.0/24
95.131.104.0/24
95.131.105.0/24
95.131.106.0/24
95.131.107.0/24
95.131.108.0/24
95.131.109.0/24
95.131.110.0/24
95.131.111.0/24
46.226.48.0/24
46.226.49.0/24
46.226.50.0/24
46.226.51.0/24
46.226.52.0/24
46.226.53.0/24
46.226.54.0/24
46.226.55.0/24
117.120.16.0/24
117.120.17.0/24
117.120.18.0/24
117.120.19.0/24
117.120.20.0/24
117.120.21.0/24
117.120.22.0/24
117.120.23.0/24
193.109.254.0/24
193.109.255.0/24
194.106.220.0/24
194.106.221.0/24
195.245.230.0/24
195.245.231.0/24
103.9.96.0/24
103.9.97.0/24
103.9.98.0/24
103.9.99.0/24
From within the Exchange Admin Center.
1.       Select mail flow
2.       Select connectors
3.       Click the plus sign to add a new Inbound connector
Within the new inbound connector properties give the connector a name eg. (Symantec Cloud IPs).
In the Sender IP address field click the plus sign to start entering IPs in CIDR notation as shows in table 1.1
PowerShell Script
Entering in one by one each of the IPs can be time consuming. The below PowerShell script can be used if you do not want to manually enter all these IPs.