# Ollama Localhost Guardian

> Verify that local LLM services, including Ollama, are bound and configured safely before they are exposed or connected. Use for: Ollama security, check exposed Ollama, secure local LLM, Ollama localhost.

- Skill: `stijnman/ollama-localhost-guardian` (Agent Skill)
- Install (CLI): `npx skillmds@latest add stijnman/ollama-localhost-guardian`
- Raw SKILL.md: https://api.skillmd.com/api/skills/stijnman/ollama-localhost-guardian/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: Stijnman (https://skillmd.com/u/stijnman)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/stijnman/ollama-localhost-guardian

---

# Ollama Localhost Guardian
## When to Use

- User says **ollama security** or task matches this capability
- User says **is ollama exposed** or task matches this capability
- User says **secure local LLM** or task matches this capability
- User says **ollama localhost** or task matches this capability

## Workflow

1. Check listener on default Ollama port (11434) via ss or netstat.
2. Pass if bound to 127.0.0.1; warn if 0.0.0.0 or ::.
3. Optionally check OLLAMA_HOST env and systemd override files (read-only).
4. Recommend binding to 127.0.0.1; hitl-approver before config changes.
5. Note installed AI packages (mcp, openai, etc.) for inventory only.

## Integrations

- `defensive-mcp-audit`
- `exposed-service-triage`
- `hitl-approver`

## Error Handling

| Failure | Response |
|---------|----------|
| Ollama not running | Report not listening; no install assumed. |

## Gotchas

- Check-only; config edits require user approval.

## Safety & Ethics (Publication-Ready)

This skill is designed for public distribution. Constraints:

- Read-only checks; no model pulling or inference API abuse.
- No exposure of API keys or model weights.

### Prohibited actions

- No unauthorized access, malware, or harmful automation
- No silent exfiltration of data, credentials, or telemetry
- No destructive system changes without hitl-approver
- No publication of user PII or environment secrets in outputs

## Example

**Input:** User request matching triggers above.
**Output:** Structured result per workflow; local artifacts only unless user opts in.

