SafeDNS Agent for macOS MDM integration
System requirements: macOS 14 or newer.
Currently, each installation package is created and signed individually.
- Download and install the macOS Agent either from the SafeDNS Dashboard or using this link - https://safedns.com/downloads/AgentSafeDNS-signed.pkg
- Log into the Agent using the SafeDNS account credentials.
- Follow the on-screen prompts for the PIN code.
- Navigate to the /private/etc/agentsafedns/ folder.
You can use the following command in the Terminal:open /etc/agentsafedns/
- Send the file in this folder to support@safedns.com, and wait until the installation file is created.
- Receive the AgentSafeDNS.pkg installation file from Support.
- Open the MDM integrator.
We are using Hexnode as an example. - Navigate to the Apps tab.
- Click Add Apps > Enterprise app.
- Select the macOS platform.
- Choose any name for App Name.
- Choose .pkg file type.
- Add any description.
- Upload the AgentSafeDNS.pkg file.
- Click Add.
- Wait for the MDM integrator to check the file. It usually takes around 10 seconds.
- The app will receive a Success status.
- 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. - 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