Fixing "EHOSTUNREACH" Error in Postman on MacOS
When making local network requests in Postman on MacOS, you might encounter an error similar to this:
Copied!
1GET https://www.domain.test/api/data2Error: 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
- Open System Settings (or System Preferences) on your Mac
- Navigate to Privacy & Security
- Scroll down to find Local Network
- Locate Postman in the list of applications
- Enable the toggle switch next to Postman
Verification
After enabling the permission:
- Restart Postman
- Retry your local network request
- 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.