We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.

Restrict Inbound Mail to the Barracuda Email Security Service IP Range

  • Last updated on

For a list of Essentials options and setup instructions, see Step 1 - Set Up Essentials for Office 365.

Time Requirement

After updating your MX records, allow at least 24-48 hours before completing the steps in this section to allow the records to propagate.

The steps in this section enhance the security of the connection between Barracuda Email Security Service and Office 365. It will only allow inbound email to come from the Barracuda system.

  1. Connect to Exchange Online Powershell using one of the options:
  2. Find the correct IP range based on the region selected when setting up your Barracuda Email Security Service instance. Refer to the Barracuda Email Security Service IP Ranges for the IP ranges corresponding to your region. 
  3. After you connect to Exchange Online PowerShell, expand and run the appropriate script based on the connection setup you chose: 

 

PowerShell Script for the Australia Region
Set-ExecutionPolicy unrestricted 
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 3.24.133.128/25 -RestrictDomainstoIPAddresses $true
PowerShell Script for the Canada Region
Set-ExecutionPolicy unrestricted
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 15.222.16.128/25 -RestrictDomainstoIPAddresses $true
PowerShell Script for the German Region
Set-ExecutionPolicy unrestricted 
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 35.157.190.224/27 -RestrictDomainstoIPAddresses $true
PowerShell Script for the UK Region
Set-ExecutionPolicy unrestricted 
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 35.176.92.96/27 -RestrictDomainstoIPAddresses $true
PowerShell Script for the US Region
Set-ExecutionPolicy unrestricted 
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 64.235.144.0/24,64.235.145.0/24,64.235.146.0/24,64.235.147.0/24,64.235.148.0/24,64.235.149.0/24,64.235.150.0/24,64.235.151.0/24,64.235.152.0/24,64.235.153.0/24,64.235.154.0/24,64.235.155.0/24,64.235.156.0/24,64.235.157.0/24,64.235.158.0/24,64.235.159.0/24,209.222.80.0/24,209.222.81.0/24,209.222.82.0/24,209.222.83.0/24,209.222.84.0/24,209.222.85.0/24,209.222.86.0/24,209.222.87.0/24 -RestrictDomainstoIPAddresses $true

 

Note: Replace <your-UPN> with your Office 365 account.

PowerShell Script for the Australia Region
Connect-EXPOSSession -UserPrincipalName <your-UPN> 
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 3.24.133.128/25 -RestrictDomainstoIPAddresses $true
PowerShell Script for the Canada Region
Connect-EXPOSSession -UserPrincipalName <your-UPN>  
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 15.222.16.128/25 -RestrictDomainstoIPAddresses $true
PowerShell Script for the German Region
Connect-EXPOSSession -UserPrincipalName <your-UPN> 
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 35.157.190.224/27 -RestrictDomainstoIPAddresses $true
PowerShell Script for the UK Region
Connect-EXPOSSession -UserPrincipalName <your-UPN>  
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 35.176.92.96/27 -RestrictDomainstoIPAddresses $true
PowerShell Script for the US Region
Connect-EXPOSSession -UserPrincipalName <your-UPN>  
New-InboundConnector -Name "Barracuda Inbound Connector" -RequireTls $true -SenderDomains * -SenderIPAddresses 64.235.144.0/24,64.235.145.0/24,64.235.146.0/24,64.235.147.0/24,64.235.148.0/24,64.235.149.0/24,64.235.150.0/24,64.235.151.0/24,64.235.152.0/24,64.235.153.0/24,64.235.154.0/24,64.235.155.0/24,64.235.156.0/24,64.235.157.0/24,64.235.158.0/24,64.235.159.0/24,209.222.80.0/24,209.222.81.0/24,209.222.82.0/24,209.222.83.0/24,209.222.84.0/24,209.222.85.0/24,209.222.86.0/24,209.222.87.0/24 -RestrictDomainstoIPAddresses $true
Last updated on