Group Purchasing
Group Purchasing

Your Local AI Server Is Not Local: Finding Exposed Ollama Hosts Without Crossing the Line

Authored byKenneth G. Hartman
Kenneth G. Hartman

Highlights:

  • In January 2026, SentinelLABS and Censys reported finding 175,108 unique Ollama hosts reachable from the internet, and more than 48% of them advertised tool-calling capabilities.
  • This post explains how a single environment variable and a Docker port mapping put a “local” model server on the public internet.
  • It also covers how to find your own exposed hosts through Shodan without sending a packet to them, the controls that close the gap, and where reconnaissance turns into a computer misuse law question.

In January 2026, SentinelLABS and Censys published the results of a joint study that should make anyone running a "local" large language model check their firewall. Over 293 days of scanning, the researchers recorded 7.23 million observations from 175,108 unique Ollama hosts across 130 countries and found that over 48% of those hosts advertise tool-calling capabilities through their API endpoints [1]. In most cases, I suspect, the root cause is not a software flaw but a configuration choice, made for convenience, by people who believed they were running something on their own machine.

This post covers three things:

  1. How a local model server ends up on the internet;
  2. How defenders can find their own exposed servers before someone else does;
  3. Where reconnaissance stops being research and starts being a legal question.

That last part matters for anyone doing attack surface work for clients, because the tools make it very easy to take one step too many.

How a Local Server Becomes a Public One

Ollama is a good example because its defaults are safe. According to its own documentation, "Ollama binds 127.0.0.1 port 11434 by default," and the bind address is changed with the OLLAMA_HOST environment variable [2]. The documentation's own example for exposing the service on a network is OLLAMA_HOST=0.0.0.0:11434. Users set it so they can reach the model from a phone, a laptop, or another container, and in doing so they bind the service to every interface on the host, including the public one.

The second step is what turns an exposed port into an open door. Ollama's documentation is explicit that "the local API at http://localhost:11434 does not require authentication" [3]. That is a sensible design for a service bound to the loopback interface. It is not sensible for a service bound to 0.0.0.0 on a cloud VM with a public IP address. Anyone who can reach the port can list the installed models, run inference on your hardware, and, where tool-calling is configured, ask the model to act on systems it can reach.

Containers add a subtler failure. Ollama's Docker instructions publish the port with -p 11434:11434 [4]. Many administrators assume that a host firewall such as UFW will still govern that port. It will not. Docker's documentation explains that published container ports are handled by rules Docker writes in the nat table, so the traffic is routed before it reaches the INPUT chain where UFW's rules live, and Docker describes the two as incompatible [5]. The result is a host where ufw status reports a locked-down firewall while the model server answers anyone on the internet.

Why Exposure Is Worse Than It Sounds

An unauthenticated model server is not just a free GPU for someone else. The SentinelLABS and Censys researchers framed the exposed hosts as a compute layer that operates outside the guardrails of commercial AI platforms [1]. Whoever finds your server gets your compute without your safety controls, and whatever they use it for runs on your hardware.

The server software itself has also had serious flaws. In 2024, Wiz Research disclosed CVE-2024-37032, nicknamed "Probllama," a path traversal vulnerability in Ollama's API that could lead to remote code execution on exposed instances running vulnerable versions [6], [7]. An unauthenticated API on the internet turns every future vulnerability of that kind into an internet-scale problem on the day it is disclosed.

Finding Your Own Exposed Servers

The same property that makes these servers easy to abuse makes them easy to find. Ollama's server answers a request for its root path with a fixed string. In the project's own source code, the handler for / returns the text Ollama is running [8]. Internet-wide scanners record that response, which means a defender does not need to touch a single host to find exposed instances in their own address space.

Shodan's search filters make this practical [9]. By default, a Shodan search term is matched against the banner a service returned [10], so you can combine the default port and the banner text, then scope the search to address space you are responsible for:

port:11434 "Ollama is running" net:203.0.113.0/24
port:11434 "Ollama is running" asn:AS64500

The net: filter restricts results to a CIDR block and asn: restricts them to an autonomous system, so a cloud security team can run these against its own registered ranges as a recurring external attack surface check. Other model servers use different default ports and banners, so treat any single fingerprint as a starting point rather than a complete inventory. Validate any query against a host you control before relying on it, because a fingerprint that silently misses a variant is worse than no check at all.

Fixing It

The fixes are not exotic, and most of them are exactly the network controls we teach for any cloud workload:

  • Bind to loopback. Leave OLLAMA_HOST at its default of 0.0.1 unless you have a specific reason to change it [2].
  • Publish container ports to loopback. Use -p 127.0.0.1:11434:11434 rather than -p 11434:11434, or filter in the DOCKER-USER chain, whose rules Docker processes before the rules in its own DOCKER-FORWARD and DOCKER chains [11].
  • Put authentication in front. If remote access is genuinely needed, reach the service over a VPN such as WireGuard or Tailscale, or through a reverse proxy that requires authentication.
  • Enforce at the cloud layer. Security groups and network security groups apply before traffic reaches the instance, so a misconfigured host firewall cannot undo them.
  • Verify from outside. Test reachability from a separate network, not from the host itself, and confirm the result in Shodan's index for your ranges over time.

Where Reconnaissance Stops: Computer Misuse Law

Here is where practitioners need to slow down. Querying Shodan's index is reading Shodan's database. You never send a packet to the target. Connecting to an exposed Ollama host yourself and calling GET /api/tags to list its models is different: You are now interacting with someone else's computer, and computer misuse law applies.

Many countries have such a law. The United Kingdom's Computer Misuse Act 1990 makes it an offense to cause a computer to perform any function with intent to secure access you know is unauthorized [17]. In the European Union, Directive 2013/40/EU sets minimum rules that require member states to criminalize intentional access to an information system "without right," at least where it is "committed by infringing a security measure" [18]. That condition is worth noticing when a service has no authentication at all, but it is a floor, and national laws may reach further. More broadly, the Council of Europe's Convention on Cybercrime aims at a common criminal policy against cybercrime, including violations of network security [19], and 84 states, including the United States, Canada, Japan, and Australia, have ratified or acceded to it [20].

The details differ by jurisdiction, but the UK act and the EU directive both ask whether the access was authorized. The rest of this section uses the U.S. statute, the Computer Fraud and Abuse Act (CFAA), as the worked example. If you work elsewhere, read the U.S. authorities below as an illustration of the questions to ask, not as the law that governs you.

The CFAA punishes whoever "intentionally accesses a computer without authorization or exceeds authorized access, and thereby obtains ... information from any protected computer" [12]. It also gives a civil cause of action to anyone who suffers qualifying damage or loss from a violation [12], which means criminal charges are not the only exposure.

Three authorities shape how this applies to an unauthenticated service, and each has a limit worth understanding.

Van Buren v. United States (2021). The Supreme Court described CFAA liability as turning on "a gates-up-or-down inquiry," in which "one either can or cannot access a computer system, and one either can or cannot access certain areas within the system" [13]. It is tempting to read that as saying an unauthenticated API has no gate. But in footnote 8 the Court expressly declined to decide "whether this inquiry turns only on technological (or 'code-based') limitations on access, or instead also looks to limits contained in contracts or policies" [13]. Van Buren narrowed the statute. It did not bless unauthenticated access.

hiQ Labs v. LinkedIn (9th Cir. 2022). The Ninth Circuit held that "when a computer network generally permits public access to its data, a user's accessing that publicly available data will not constitute access without authorization under the CFAA," reasoning that a computer hosting public web pages "has erected no gates to lift or lower in the first place" [14]. Note the limits: The language is that such access is "likely" lawful; the ruling came at the preliminary injunction stage; it binds only in the Ninth Circuit; and it concerned public web pages that their owner intended the public to see. An Ollama API that its owner exposed by accident is not obviously the same thing.

The Department of Justice charging policy (2022). The Justice Manual now directs that federal prosecutors "should decline prosecution if available evidence shows the defendant's conduct consisted of, and the defendant intended, good-faith security research," defined as access "solely for purposes of good-faith testing, investigation, and/or correction of a security flaw or vulnerability, where such activity is carried out in a manner designed to avoid any harm to individuals or the public" [15]. That is meaningful comfort, but read it for what it is. By its own terms it is guidance for federal prosecutors that creates no enforceable right, and it says nothing about private civil suits under the CFAA nor about state computer crime laws, neither of which it governs.

Why Shodan Can Do It and You Probably Should Not

If touching a stranger's host is a gray area, how do Shodan and Censys operate at all? I have not found a court decision that squarely decides whether internet-wide banner collection violates the CFAA. What the scanning services have is a posture, not a precedent:

  • They record what a service volunteers to any client that connects, rather than authenticating, guessing credentials, or sending exploit payloads.
  • They scan indiscriminately rather than targeting a particular victim, which looks like measurement rather than reconnaissance.
  • They operate openly, with identifiable scanning infrastructure and published opt-out procedures, a practice the research community has recommended since the ZMap paper [16].
  • Their conduct fits comfortably inside the good-faith research framing of the DOJ policy [15].

Even the scanners have edges where this posture gets thin. Rendering an unauthenticated remote desktop session or calling an API endpoint to enumerate installed models is a step past reading a greeting banner.

Most of that protection does not transfer to a consultant. A focused probe of specific hosts, for a specific client, for a specific purpose, is the opposite of indiscriminate. So my practical rules are simple:

  • Index lookups are the safe default. Querying Shodan or Censys never touches the target.
  • Touching a host requires written authorization from whoever owns or controls the address space, whether that means your client's own ranges or a third party's.
  • Put the boundary in the statement of work. For passive engagements, state that reconnaissance is limited to third-party indexes and public records, so there is a paper trail showing you never sent a packet to anything you were not engaged to test.
  • If you find someone else's exposed server, report it through the owner's security contact or the hosting provider's abuse channel rather than confirming it yourself.

This is not legal advice. The honest state of the law is that the CFAA's reach over unauthenticated scanning is unsettled, and the comfort the industry takes comes from a decade of non-prosecution rather than from a case that squarely approves it. If your engagement depends on the answer, ask counsel.

Ready to Take the Next Step?

Exposed services, host firewalls that do not mean what their status output says, and network controls that hold even when a host is misconfigured are core topics in SEC502: Cloud Security Tactical Defense. If this post was useful, I invite you to join us at an in-person event or OnDemand, where we work through these defenses hands-on across AWS and Azure.

References

Technical behavior described here was verified against vendor documentation and source code, and every reference was retrieved on October 23, 2026.

[1] G. Bernadett-Shapiro and S. Cutler, "Silent Brothers | Ollama Hosts Form Anonymous AI Network Beyond Platform Guardrails," SentinelLABS, SentinelOne, Jan. 29, 2026 (updated Mar. 6, 2026). Accessed: Oct. 23, 2026. [Online]. Available: https://www.sentinelone.com/labs/silent-brothers-ollama-hosts-form-anonymous-ai-network-beyond-platform-guardrails/

[2] Ollama, "FAQ," Ollama Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.ollama.com/faq

[3] Ollama, "Authentication," Ollama API Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.ollama.com/api/authentication

[4] Ollama, "Docker," Ollama Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.ollama.com/docker

[5] Docker, Inc., "Packet filtering and firewalls," Docker Docs. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.docker.com/engine/network/packet-filtering-firewalls/

[6] S. Tzadik, "Probllama: Ollama Remote Code Execution Vulnerability (CVE-2024-37032) – Overview and Mitigations," Wiz Blog, Jun. 24, 2024. Accessed: Oct. 23, 2026. [Online]. Available: https://www.wiz.io/blog/probllama-ollama-vulnerability-cve-2024-37032

[7] National Institute of Standards and Technology, "CVE-2024-37032 Detail," National Vulnerability Database. Accessed: Oct. 23, 2026. [Online]. Available: https://nvd.nist.gov/vuln/detail/CVE-2024-37032

[8] Ollama, "server/routes.go," ollama/ollama, GitHub. Accessed: Oct. 23, 2026. [Online]. Available: https://github.com/ollama/ollama/blob/main/server/routes.go

[9] Shodan, "Filter Reference," Shodan. Accessed: Oct. 23, 2026. [Online]. Available: https://www.shodan.io/search/filters

[10] Shodan, "Search Query Fundamentals," Shodan Help Center. Accessed: Oct. 23, 2026. [Online]. Available: https://help.shodan.io/the-basics/search-query-fundamentals

[11] Docker, Inc., "Docker with iptables," Docker Docs. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.docker.com/engine/network/firewall-iptables/

[12] Fraud and related activity in connection with computers, 18 U.S.C. § 1030. Accessed: Oct. 23, 2026. [Online]. Available: https://www.law.cornell.edu/uscode/text/18/1030

[13] Van Buren v. United States, 593 U.S. 374 (2021). Accessed: Oct. 23, 2026. [Online]. Available: https://www.supremecourt.gov/opinions/20pdf/19-783_k53l.pdf

[14] hiQ Labs, Inc. v. LinkedIn Corp., 31 F.4th 1180 (9th Cir. 2022). Accessed: Oct. 23, 2026. [Online]. Available: https://cdn.ca9.uscourts.gov/datastore/opinions/2022/04/18/17-16783.pdf

[15] U.S. Department of Justice, "9-48.000 - Computer Fraud and Abuse Act," Justice Manual, updated May 2022. Accessed: Oct. 23, 2026. [Online]. Available: https://www.justice.gov/jm/jm-9-48000-computer-fraud

[16] Z. Durumeric, E. Wustrow, and J. A. Halderman, "ZMap: Fast Internet-wide Scanning and Its Security Applications," in Proc. 22nd USENIX Security Symposium, Washington, DC, USA, 2013. Accessed: Oct. 23, 2026. [Online]. Available: https://www.usenix.org/conference/usenixsecurity13/technical-sessions/paper/durumeric

[17] Computer Misuse Act 1990, c. 18, s. 1 (U.K.). Accessed: Oct. 23, 2026. [Online]. Available: https://www.legislation.gov.uk/ukpga/1990/18/section/1

[18] Directive 2013/40/EU of the European Parliament and of the Council of 12 August 2013 on attacks against information systems and replacing Council Framework Decision 2005/222/JHA, Off. J. Eur. Union, vol. L 218, p. 8, 2013. Accessed: Oct. 23, 2026. [Online]. Available: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32013L0040

[19] Council of Europe, "Details of Treaty No. 185: Convention on Cybercrime (ETS No. 185)," Treaty Office. Accessed: Oct. 23, 2026. [Online]. Available: https://www.coe.int/en/web/conventions/full-list?module=treaty-detail&treatynum=185

[20] Council of Europe, "Chart of signatures and ratifications of Treaty 185," Treaty Office. Accessed: Oct. 23, 2026. [Online]. Available: https://www.coe.int/en/web/conventions/full-list?module=signatures-by-treaty&treatynum=185

Your Local AI Server Is Not Local: Finding Exposed Ollama Hosts Without Crossing the Line | SANS Institute