Never expose Ollama to the internet without a login

Rapid7: 54.8% of 7,675 exposed Ollama servers already carried models planted by strangers · Security incident · Rapid7 blog · rapid7 · Nov 18, 2026

What happened

Rapid7 scanned 20,354 pre-selected hosts on 10 November and found 7,675 Ollama servers answering without authentication. 4,209 of them (54.8%) listed models left by someone else, such as callback addresses and Base64 file paths decoding to /etc/shadow. 79% listed cloud-routed models, which Rapid7 says can let strangers use a signed-in owner's paid ollama.com account.

How to prevent it

Bind Ollama to 127.0.0.1 or a private network, put an authenticating proxy in front if you need remote access, and if your model list shows names you didn't pull, treat the box as compromised and rotate what's in its environment.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I run Ollama for my app or for local AI coding. Help me check it isn't open to strangers. 1) Tell me how to see which address Ollama listens on (OLLAMA_HOST) and flag 0.0.0.0 or a public IP. 2) Show me how to list my models and explain which names would look like a stranger's (IP addresses, tunnel domains, ttl.sh, names like beacon, probe or pwn). 3) If remote access is needed, show me how to put an authenticating reverse proxy in front instead of opening port 11434. 4) If I find a stranger's model, give me the steps: rotate secrets in the service's environment, revoke the Ollama key on my ollama.com account, check usage, and rebuild. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: self-hosted models & ai servers

Model servers such as Ollama, llama.cpp, vLLM and Gradio were built for a trusted laptop or lab. Many have no login, and one setting change puts them on a public address. Model files can also carry code that runs when they load.

A quick checklist before you ship

More on this: every self-hosted models & ai servers story and our related guide.

Tools involved

Ollama stories, Qwen stories, Llama stories, DeepSeek stories

Related stories

Source: original post on Rapid7 blog ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.