Skip to content

Instantly share code, notes, and snippets.

@rkage
Last active September 12, 2023 03:16
Show Gist options
  • Select an option

  • Save rkage/cdce49809641b4415abd75eeab1121a4 to your computer and use it in GitHub Desktop.

Select an option

Save rkage/cdce49809641b4415abd75eeab1121a4 to your computer and use it in GitHub Desktop.

This is how to bypass MDM/DEP on a M2 Macbook Pro with Ventura:

  1. Blocked iprofiles.apple.com, mdmenrollment.apple.com and deviceenrollment.apple.com at the router.
  2. On first install, skip internet connection
  3. On first login (still without network), open Terminal.app and update /etc/hosts with the following:
echo 0.0.0.0 iprofiles.apple.com | sudo tee -a /etc/hosts
echo 0.0.0.0 mdmenrollment.apple.com | sudo tee -a /etc/hosts
echo 0.0.0.0 deviceenrollment.apple.com | sudo tee -a /etc/hosts
  1. Removed any lingering profiles just in case:
sudo profiles remove -all

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment