Here is how to diagnose whether the Headwind MDM launcher APK URL is accessible from the local machine.
1. Sign in to the web panel, and open the Applications tab
2. Find com.hmdm.launcher and copy its URL
3. Login to the server by SSH
4. Run the command
# wget http://your.host.com/path/to/launcher.apk
(paste the launcher URL after wget command)
5. On success, you get the message that the file is successfully downloaded.
If you see any error (for example, Connection timed out), your network setup may be wrong.
Possible solution if you're behind the NAT
To check if you're behind the NAT, perform the following diagnostics:
1. Ping the server domain name or IP address from outside your LAN; you'll (hopefully) see the external IP address of your server
2. Run the command
# ip address
and check if you see here your external IP address.
If you don't see your external IP address but see something like 192.168.2.130, you're behind the NAT.
The server usually has two IP addresses. One of them is localhost and has 127.0.0.1 IP address. You need to get another one.
Note: this solution will only work if you're using the domain name for your MDM server (a strongly recommended option!).
Edit the file /etc/hosts (as root):
# sudo nano /etc/hosts
Add the following line to this file:
your.ip.address mdm.host.name
Example:
192.168.2.130 mdm.my-company.com
Then retry the wget command - it should succeed.
If Headwind MDM is behind a reverse proxy
If Headwind MDM is behind a reverse proxy, use the same trick with /etc/hosts/, but point the Headwind MDM domain to the reverse proxy IP address instead of a local IP address.