Jose Jimenez
Jose Jimenez
Software Architect & Developer
> >

Fixing "EHOSTUNREACH" Error in Postman on MacOS

Published in macOS, Vagrant on Dec 13, 2024

When making local network requests in Postman on MacOS, you might encounter an error similar to this:

1GET https://www.domain.test/api/data
2Error: connect EHOSTUNREACH 192.168.0.102:80 - Local (192.168.0.1:53912)

Root Cause

This error typically occurs after a MacOS update when local network permissions for Postman need to be reauthorized. MacOS's security features require explicit permission for applications to access local network resources.

Solution

  1. Open System Settings (or System Preferences) on your Mac
  2. Navigate to Privacy & Security
  3. Scroll down to find Local Network
  4. Locate Postman in the list of applications
  5. Enable the toggle switch next to Postman

Verification

After enabling the permission:

  1. Restart Postman
  2. Retry your local network request
  3. The EHOSTUNREACH error should now be resolved

Additional Notes

  • This permission is required for accessing local development servers and APIs
  • You may need to repeat this process after Postman updates
  • This process may need to be repeated after MacOS updates
  • Similar steps may be required for other development tools that access local network resources

If you continue experiencing issues after following these steps, verify your local server is running and check your network configuration.