-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
web_fetch fails when using VPN TUN mode (DNS hijacked to 198.18.x.x) #38986
Copy link
Copy link
Open
Description
Description
When using a VPN in TUN mode (e.g., ShadowRocket on macOS), the system DNS is hijacked to 198.18.0.2, which returns fake IPs in the 198.18.x.x range for all domain lookups.
The web_fetch tool fails with:
Blocked: resolves to private/internal/special-use IP address
This happens because OpenClaw has SSRF protection that blocks special-use IP addresses (including 198.18.x.x benchmark range), and this check happens before the request goes through the HTTP_PROXY.
Steps to reproduce
- Set up a VPN client in TUN mode that hijacks DNS
- Configure HTTP_PROXY/HTTPS_PROXY in OpenClaw config
- Try to use web_fetch tool
Expected behavior
web_fetch should work when HTTP_PROXY is configured.
Workaround
- curl works fine through the same proxy
- The issue is specifically in OpenClaw SSRF protection checking the resolved IP before using the proxy
Possible solutions
- Add DNS resolver config option (e.g., --dns-resolver=8.8.8.8)
- Make SSRF protection smarter when HTTP_PROXY is configured - skip IP check when using proxy
- Allow configuring which IP ranges to block
Environment
- OpenClaw: v2026.3.2
- macOS
- VPN: ShadowRocket TUN mode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.