This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Networks Created via UTM API Don't work

So recently to quickly deploy some network definitions to my UTM for Zoom, I leveraged the Sophos UTM API to get the job done. As per https://support.zoom.us/hc/en-us/articles/201362683-Network-Firewall-or-Proxy-Server-Settings-for-Zoom, they have a lot of networks to create definitions for. I used PowerShell to just quickly create the network definitions.

 

$Uri = "pbnesutm201.internal.local/.../"
$ContentType = "application/json"
$Method = "Post"
$Header = @{
    Authorization = "Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
}

ForEach ($Subnet in $Subnets){
    $Body = @{
        address = $Subnet.Address
        address6 = $null
        comment = $Subnet.Comment
        interface = $null
        name = "net_$($Subnet.Application) IP4 $($Subnet.Number)"
        netmask = $Subnet.Mask
        netmask6 = 128
        resolved = $false
        resolved6 = $false
    } | ConvertTo-Json
    
    Invoke-RestMethod -Method $Method -Header $Header -Uri $Uri -ContentType $ContentType -Body $Body
    Start-Sleep -Seconds 1
}


A really basic iteration through an array of string objects containing a list of subnets from the Zoom support page. The input file was just a CSV containing:

  • Subnet Address (e.g. 3.25.41.128)
  • Subnet Comment (e.g. link to Zoom article)
  • Subnet Row Number (e.g. 1,2,3,4,5)
  • Subnet Mask (e.g. /25)

This is consumed into a JSON object which is passed to the Sophos UTM API. It appeared to work beautifully. The only problem, the network definitions don't work. If I create a rule, and add one of these network definitions as the destination, the rule doesn't match. I can fix it just by doing the following, exact steps:

  1. Open network definitions.
  2. Search for the network definition (e.g. net_Zoom IP4 01).
  3. Edit.
  4. Make 0 changes.
  5. Save.

Instantly the network definition starts working as soon as I hit save. Has anybody else come across something similar? I cannot for the life of me figure out what it does not like about what has been created via the API. Analysing the strings, there are no stray characters (e.g. no white space at the front or back, no special characters, etc.). I've spat out a list of subnets in CIDR format and by address and mask. It all looks fine to me.

Any ideas? :)



This thread was automatically locked due to age.