Skip to main content

SafeDNS Agent for macOS MDM integration

System requirements: macOS 14 or newer.

Currently, each installation package is created and signed individually.

  1. Download and install the macOS Agent either from the SafeDNS Dashboard or using this link - https://safedns.com/downloads/AgentSafeDNS-signed.pkg
  2. Log into the Agent using the SafeDNS account credentials.
  3. Follow the on-screen prompts for the PIN code.
  4. Navigate to the /private/etc/agentsafedns/ folder.
    You can use the following command in the Terminal: open /etc/agentsafedns/
  5. Send the file in this folder to support@safedns.com, and wait until the installation file is created.
  6. Receive the AgentSafeDNS.pkg installation file from Support.
  7. Open the MDM integrator.
    We are using Hexnode as an example.
  8. Navigate to the Apps tab.
    2.png
  9. Click Add Apps > Enterprise app.
    3.png
  10. Select the macOS platform.
  11. Choose any name for App Name.
  12. Choose .pkg file type.
  13. Add any description.
  14. Upload the AgentSafeDNS.pkg file.
  15. Click Add.
    4.png
  16. Wait for the MDM integrator to check the file. It usually takes around 10 seconds.
    5.png
  17. The app will receive a Success status.
    6.png
  18. The app is ready to be installed on the devices.

    The installation process features are different for each MDM integrator.
    In general, MDM integrators group devices or users so you can assign the Agent to them.
    Hexnode, for example, allows the app to be installed for a group of users, a group of devices, or individual devices.

  19. To launch the agent after MDM installation, share the following script through MDM and wait 2-5 minutes: 
#!/bin/bash

APP_PATH="/Applications/AgentSafeDNS/SafeDNS Agent.app"

CURRENT_USER=$(stat -f "%Su" /dev/console)

if [ -d "$APP_PATH" ]; then
    echo "SafeDNS Agent found, attempting to launch..."

    sudo -u "$CURRENT_USER" osascript -e "tell application \"$APP_PATH\" to activate"

    if [ $? -eq 0 ]; then
        echo "SafeDNS Agent launched successfully."
    else
        echo "Failed to launch SafeDNS Agent."
    fi
else
    echo "SafeDNS Agent not found at $APP_PATH."
fi