Live data from Hacker News

175K+ publicly-exposed Ollama AI instances discovered

techradar.com

11–20 of 41 posts

Re: 175K+ publicly-exposed Ollama AI instances discovered

#11
post #4

Earlier quoted context omitted.

The article says no, the default is listening to just localhost. Given the instances in question have been deliberately configured to listen on public ports, calling this misconfiguration seems somewhat unjustified.

Not true for their docker instructions which specify -p 11434:11434 instead of -p 127.0.0.1:11434:11434. [1] Combine that with rootful docker's famous bypass of ufw and you have a publicly exposed ollama, even with a firewall. [2] [1] https://docs.ollama.com/docker [2] https://github.com/moby/moby/issues/4737

[deleted]

Re: 175K+ publicly-exposed Ollama AI instances discovered

#12
The tool-calling thing here is overblown.

When you do "tool calling" with an LLM, all you're doing is having the LLM generate output in a particular format you can parse out of the response; it's then your code's responsibility to run the tools (locally) and stick the results back into the conversation.

So that _specific_ part isn't RCE. It's still bad for the nine million other obvious reasons though.

Re: 175K+ publicly-exposed Ollama AI instances discovered

#13
post #10

Fun fact! On macOS you can expose privileged ports ( But ONLY if you don't bind the listening port to any interface. So you try to create a listening port on localhost (e.g. 127.0.0.1:443) under a non-root account you get a permission error. Edit: the thing is, you CAN expose "0.0.0.0:443" without root privileges!

How exactly are the ports "exposed" if they can't be bound to an interface?

Re: 175K+ publicly-exposed Ollama AI instances discovered

#14

This is a weakness of docker, a bit, I think. I was rigging this up, myself, and conciscious of the fact that basic docker is "all or none" for container port forwarding because it's for presenting network services, had to dig around with iptables so it'd be similar to binding on localhost. The use case https://github.com/meltyness/tax-pal The ollama container is fairly easy to deploy, and supports GPU inference thro…

Yes the binding interface can be specified, but the default for -p 11434:11434 is 0.0.0.0.

IMO the default should be 127.0.0.1 and the user should have to explicitly bind to all via -p 0.0.0.0:11434:11434.

Re: 175K+ publicly-exposed Ollama AI instances discovered

#15
post #10

Fun fact! On macOS you can expose privileged ports ( But ONLY if you don't bind the listening port to any interface. So you try to create a listening port on localhost (e.g. 127.0.0.1:443) under a non-root account you get a permission error. Edit: the thing is, you CAN expose "0.0.0.0:443" without root privileges!

A feature! Not a bug! Bugs can be undisovered features.

Re: 175K+ publicly-exposed Ollama AI instances discovered

#17
post #10

Fun fact! On macOS you can expose privileged ports ( But ONLY if you don't bind the listening port to any interface. So you try to create a listening port on localhost (e.g. 127.0.0.1:443) under a non-root account you get a permission error. Edit: the thing is, you CAN expose "0.0.0.0:443" without root privileges!

it's called a privileged port and it's been like this for decades, on every system, ever.

Here's a reference to this "macos feature" from 1995: https://www.w3.org/Daemon/User/Installation/PrivilegedPorts....

Re: 175K+ publicly-exposed Ollama AI instances discovered

#18
I'm not sure the "journos" from Techradar are too familiar with how networks ... work.

IPv4 requires an inbound NAT these days to work at all globally, unless you actually have a machine with a globally routable IP. There will probably be a default deny firewall rule too. I do remember the days before NAT ...

IPv6 doesn't require NAT (but prefix translation is available and so is ULA) but again a default deny is likely in force.

You do actually have to try quite hard to expose something to the internets. I know this because I do a lot of it.

The entire article is just a load of buzz words and basically bollocks. Yes it is possible to expose a system on the internet but it is unlikely that you do it by accident. If I was Sead, I'd go easy on the AI generated cobblers and get a real job.

Re: 175K+ publicly-exposed Ollama AI instances discovered

#19

This is a weakness of docker, a bit, I think. I was rigging this up, myself, and conciscious of the fact that basic docker is "all or none" for container port forwarding because it's for presenting network services, had to dig around with iptables so it'd be similar to binding on localhost. The use case https://github.com/meltyness/tax-pal The ollama container is fairly easy to deploy, and supports GPU inference thro…

Yes the binding interface can be specified, but the default for -p 11434:11434 is 0.0.0.0. IMO the default should be 127.0.0.1 and the user should have to explicitly bind to all via -p 0.0.0.0:11434:11434.

Apparently been that way for a while haha

https://github.com/moby/moby/commit/1cbdaebaa1c2326e57945333...

Re: 175K+ publicly-exposed Ollama AI instances discovered

#20

I see this happen all the time when people just want their new toys to work right away. They copy and paste commands from the internet to open up the connection but they forget to put a lock on the door. It is dangerous that so many people run these programs without understanding the basics of how networks work.

Even better.

We have those who are openly admitting that they have never written / read a line of code and have no idea on what it does and using AI to deploy "AI tools" without knowing how to secure them.

Infosec experts are going to have a great time with collecting lots of money out of this.

Post reply on HN