By MV2 of Munim, Inc., with AI agents. Checked on 10 November 2026 by reading Ollama's source at all 24 release tags from v0.34.0 to v0.40.16 (the newest release then), running Ollama's own transfer tests at v0.40.16, and calling its address check in a test.
ollama pull stops with one of these (the host and address vary):
Error: redirect target not allowed: resolving dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com: lookup dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com: no such host Error: redirect target not allowed: dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com resolves to non-public 198.xxx.xxx.xxx redirect target not allowed: us.aws.cdn.hf.co resolves to non-public 64:ff9b::d27:f13a, retrying in 1s
(From #18716, #19086 and #19345; the second address was redacted by its reporter.)
Short answer:
HTTPS_PROXY where the Ollama server runs (service, app or container), not just in your shell. Ollama 0.35.0 to 0.40.5 send the model download around the proxy.HTTPS_PROXY, or make those hosts resolve to their real addresses. Details below.When you pull a model, the registry answers with a redirect to where the file actually lives: a Cloudflare R2 host (….r2.cloudflarestorage.com) for models from ollama.com, a CDN host under hf.co for Hugging Face. Since the change "tighten redirect handling for registry requests" (#18512, first released in v0.34.2), Ollama checks that target before connecting. It refuses any address that isn't public internet, so that a registry can't steer the Ollama server at your internal network or a cloud metadata address. The function is isPublicIP() in transfer/redirect.go. We called it at v0.40.16 in a test:
| Address | What it is | Allowed at v0.40.16? |
|---|---|---|
104.18.16.170, 172.64.66.1 | Cloudflare public addresses | yes |
2606:4700::6812:10aa | public IPv6 | yes |
198.18.0.1, 198.19.255.254 | 198.18.0.0/15, the "benchmarking" block that fake-IP DNS hands out | no |
100.64.0.1 | 100.64.0.0/10, shared (carrier-grade NAT) space | no |
10.0.0.1, 192.168.1.1 | private | no |
64:ff9b::6812:10aa | NAT64 form of 104.18.16.170 (64:ff9b::/96) | no: v0.40.16 accepts only IPv6 inside 2000::/3 |
| Ollama | Tagged | Redirect check | Uses HTTPS_PROXY for the download |
|---|---|---|---|
| v0.34.0, v0.34.1 | 9 to 14 Sep 2026 | none | n/a |
| v0.34.2 to v0.34.4 | 17 to 23 Sep 2026 | code present (x/transfer/redirect.go)* | no* |
| v0.35.0 to v0.40.5 | 28 Sep to 15 Oct 2026 | yes (transfer/redirect.go) | no |
| v0.40.6 to v0.40.16 | 16 Oct to 7 Nov 2026 | yes; also a list of trusted download hosts | yes |
* Users in #18716 and #19035 report pulls behind their proxies working on 0.34.x and failing from 0.35.0, and one commenter traced it to the download code switching to the checked client in v0.35.0. We read the check's code at every tag but did not trace which download path each 0.34.x release used. The proxy fix is commit 4d2e2501, "transfer: support proxies on registry redirect targets (#19065)", first in v0.40.6.
From v0.40.6, two things changed in ValidateRedirectTarget():
ollama.com, ollama.ai, hf.co, huggingface.co and cloudflarestorage.com pass that first check without a local DNS lookup.But for a direct connection (no proxy), Ollama's dialer (checkedDialer()) still resolves the name locally and refuses a non-public address with the same words, … resolves to non-public …, so a trusted host still fails when your DNS hands back a fake or NAT64 address. That part comes from reading the v0.40.16 source. In our test call the check itself passed for an R2 host with and without a proxy, and an unknown host failed only without one:
no proxy, host mv2-probe-host.invalid: ValidateRedirectTarget = redirect target not allowed: resolving mv2-probe-host.invalid: lookup mv2-probe-host.invalid on 127.0.0.11:53: no such host HTTPS proxy set, host mv2-probe-host.invalid: ValidateRedirectTarget = <nil>
Check the version with ollama -v (the server's version is the ollama version is line). On 0.40.5 or older, update first. The pull is done by the server, so HTTPS_PROXY must be in the server's environment. Ollama's FAQ says to use HTTPS_PROXY and adds:
Avoid setting
HTTP_PROXY. Ollama does not use HTTP for model pulls, only HTTPS. SettingHTTP_PROXYmay interrupt client connections to the server.
sudo systemctl edit ollama.service, add
[Service] Environment="HTTPS_PROXY=http://proxy.example:8080"then
sudo systemctl daemon-reload && sudo systemctl restart ollama.-e HTTPS_PROXY=http://proxy.example:8080.HTTPS_PROXY under Edit environment variables for your account, and start Ollama again from the Start menu.launchctl setenv HTTPS_PROXY "http://proxy.example:8080", then restart the Ollama app.If your proxy inspects TLS, its certificate must be installed as a system certificate (also in Ollama's FAQ).
VPN and proxy apps in fake-IP mode, and some routers that redirect DNS for a VPN, answer every lookup with an address from 198.18.0.0/15 and sort out the real destination later. Ollama treats those addresses as non-public, on every version from v0.35.0 up to at least v0.40.16. Choose one:
HTTPS_PROXY=http://127.0.0.1:<port> for the Ollama server as in step 1 (Ollama 0.40.6 or newer). Ollama then leaves name resolution to the proxy.registry.ollama.ai, *.r2.cloudflarestorage.com, and for Hugging Face models *.hf.co and *.huggingface.co. Most fake-IP apps have a filter or bypass list for this.ollama pull --insecure <model>. In the source, this option turns off the address checks for that pull (an https registry still can't redirect to plain http). It also stops Ollama protecting you from a registry that redirects into your network, so use it only with a registry you trust. The reporter of #19086 closed it with this.Ollama v0.40.16 accepts only IPv6 addresses inside 2000::/3, and the NAT64 prefix 64:ff9b::/96 is outside it. This is open as #19345 (no reply when we checked on 10 November 2026). Until it changes: give the Ollama host IPv4, set HTTPS_PROXY to a proxy that has IPv4, or use --insecure as above.
In #18716, Isulion fetched each blob with curl -L from https://registry.ollama.ai/v2/library/<model>/blobs/<digest> through the proxy, checked its SHA-256, saved it as models/blobs/sha256-<digest> in Ollama's model folder, and ran ollama pull again.
AI agents working for MV2 of Munim, Inc. read transfer/redirect.go (and x/transfer/redirect.go) at all 24 release tags from v0.34.0 to v0.40.16 in ollama/ollama, matched the change history to the first release containing each commit, and ran Ollama's own transfer package tests at v0.40.16 (all passed). They also added a test file there that calls isPublicIP() and ValidateRedirectTarget() directly. That test is Ollama's own code called in a test, not a real pull. We did not pull a model through a proxy, a fake-IP DNS server or a NAT64 network. The dialer behaviour on direct connections and the effect of --insecure come from reading the source. Corrections are welcome as issues at github.com/munimtechnologies/local-ai-checkup.
The free local-ai-checkup script shows which AI ports on your machine other computers can reach, and the CVE checker tells you which security advisories affect your Ollama version. Both are read-only and send nothing off the machine.
Corporate networks with proxies, VPNs and locked-down DNS are where local AI setups break most often. MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Ollama or Open WebUI server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of python3 local_ai_checkup.py --json, your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.