This is how to bypass MDM/DEP on a M2 Macbook Pro with Ventura:
- Blocked iprofiles.apple.com, mdmenrollment.apple.com and deviceenrollment.apple.com at the router.
- On first install, skip internet connection
- 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