Deployment via Mosyle

This guide covers deploying the DefensX Agent to macOS devices managed by Mosyle. The process uses shared scripts applicable to all customers, plus separate configuration profiles for the CA certificate, DNS Proxy extension, and customer-specific deployment settings.

Tip
Steps 2–5 are customer-agnostic and only need to be set up once. To deploy to a new customer or deployment, only repeat Step 5 with the corresponding mobileconfig file. For new devices under an existing customer, simply update the Profile Assignment of the existing profiles.

Step 1: Download Required Files

Log in to the DefensX backend and navigate to Policies & Groups. Under the Deployments section, locate your deployment and click the RMM button.

rmm

In the RMM dialog, click Mac MDM and download the following files:

File How to Download

DefensX-installer.sh

Click Download Installer Script

DefensX-CA.mobileconfig

Click Download DefensX-CA Certificate → As mobileconfig

DefensX-DNSProxy-Extension.mobileconfig

Click DNS Proxy Extension mobileconfig

DefensX-[deployment].mobileconfig

Click Download mobileconfig

DefensX-uninstaller.sh

Click Download Uninstaller Script

Keep all files available, they are needed in the steps below.

Step 2: Create the Installer Script

  • Navigate to Management → Management Profiles and click Custom Commands.

  • Click Add new profile.

    mosyle custom commands add
  • In the Profile Name field, enter DefensX Install Script.

  • In the Code field, open DefensX-installer.sh in a text editor and paste its contents.

    mosyle install script
  • Switch to the Execution Settings tab and select the desired Events and Schedule for the installer. For example: Every startup, Every user sign-in, and Every "Device Info" update as Events; Every 15 minutes as the Schedule.

  • In the Profile Assignment section, select the computers where you want to install DefensX.

    mosyle profile assignment
  • Click Save.

Step 3: Create the CA Certificate Configuration Profile

  • Navigate to Management → Management Profiles and click Certificates / Custom Profiles.

    mosyle custom configuration profile
  • Click Add new profile.

  • In the Profile Name field, enter DefensX CA Certificate Profile.

  • Click Select the File and upload DefensX-CA.mobileconfig.

  • In the Profile Assignment section, select the target computers.

  • Click Save.

Step 4: Create the DNS Proxy Extension Configuration Profile

This profile grants the DefensX DNS Proxy Network Extension the permissions it needs to operate without prompting users for approval. It enables DNS policy enforcement without modifying system-level DNS settings.

  • Navigate to Management → Management Profiles and click Certificates / Custom Profiles.

  • Click Add new profile.

  • In the Profile Name field, enter DefensX DNSProxy Extension.

  • Click Select the File and upload DefensX-DNSProxy-Extension.mobileconfig.

  • In the Profile Assignment section, select the target computers.

  • Click Save.

Step 5: Create the Customer-Specific Configuration Profile

This profile delivers the unique deployment key and browser settings for a specific customer. Each DefensX deployment has its own mobileconfig file containing the relevant Deployment Key.

  • Navigate to Management → Management Profiles and click Certificates / Custom Profiles.

  • Click Add new profile.

  • In the Profile Name field, enter a name that identifies the customer and deployment, e.g. DefensX [Customer Name] Default Settings.

  • Click Select the File and upload the DefensX-[deployment].mobileconfig file downloaded in Step 1.

  • In the Profile Assignment section, select the target computers.

  • Click Save.

At this point, your profiles should look similar to the screen below. After the install script executes, the DefensX Agent and all configurations will be received automatically.

mosyle all profile list

Uninstalling DefensX

Important
Before running the uninstall script, remove the target devices from the Profile Assignments in Steps 2, 3, 4, and 5, or disable each profile by toggling it off. If devices remain in those configurations, Mosyle will continue reinstalling the agent and reapplying profiles.

To create the uninstall script:

  • Navigate to Management → Management Profiles and click Custom Commands.

  • Click Add new profile.

  • In the Profile Name field, enter DefensX Uninstall Script.

  • In the Code field, open DefensX-uninstaller.sh in a text editor and paste its contents.

  • Switch to the Execution Settings tab and select the desired Events and Schedule for the uninstaller.

  • In the Profile Assignment section, select the computers to uninstall DefensX from.

  • Click Save.

The uninstall script will execute on the next scheduled trigger based on your Mosyle configuration.