Secure A LAN Model Server: Ollama And LM Studio Across VLANs
Quick Answer
Treat cross-VLAN inference as a service with explicit clients and limits. Ollama's local API does not require authentication; LM Studio 0.4 introduced permission keys, so do not assume the products have identical controls. Restrict direct backend reachability, authenticate the intended client path, and test denied enumeration, generation and tool access with synthetic requests. Add bounded capacity tests only after those restrictions work.
Evidence status: Ollama's authentication/FAQ pages and LM Studio's 0.4 announcement were checked. No listener, VLAN firewall, proxy, permission key, rate limit or shutdown path was tested on a running server.
What To Check
Ollama documents an unauthenticated local API, distinct from its authenticated cloud API. Its FAQ gives the default bind as 127.0.0.1:11434 and identifies OLLAMA_HOST as the bind setting. A cloud API key does not by itself protect a separately exposed local listener.
LM Studio 0.4 introduced permission keys managed under Settings > Server and key-gated local MCP access. Verify the installed release and key permissions instead of applying Ollama assumptions to it.
Key Concepts In Plain Language
- Backend bypass: a client reaches the model server directly instead of crossing the intended authenticated proxy.
- Inference permission: permission to submit model work, separate from managing models or invoking tools.
- Request budget: explicit limits for body size, context, output, concurrency and duration.
Technical Checklist
- Bind model APIs only where required and place authenticated TLS, firewall policy, rate limits, request limits, and logs in front of cross-VLAN use.
- Attempt unauthorized generation, model enumeration, oversized context, concurrent requests, and MCP or tool use from an untrusted VLAN.
- Separate ordinary inference from model management, file access, tool execution, and administrative actions using different identities and policies.
- Define an emergency shutdown that blocks new requests without destroying authoritative model, configuration, or audit data.
Interactive Operating Model
Use the planned checks below with this overview. No test result is implied by the diagram.
Before You Start: Safe Defaults
List the trusted client VLANs, proxy host, model listener, administrative path and any tool/MCP endpoints. Keep the backend restricted while configuring the permitted route. Use synthetic prompts and a pre-agreed test ceiling; do not discover production capacity by forcing an uncontrolled OOM.
- Do not expose an unauthenticated inference, upload, tool, MCP, or Docker control surface beyond the host that needs it.
- Use non-sensitive canary data and test accounts rather than real secrets when checking isolation.
- Cap CPU, RAM, GPU memory, disk, process count, context length, and outbound access before concurrency testing.
- Keep the environment reproducible so a compromised or wedged sandbox can be destroyed instead of repaired in place.
Go, Hold, Recover, Or Escalate
Permit cross-VLAN use only when both the intended path and direct-backend denial are verified. Hold sharing if a missing key or wrong identity still permits work. If limits fail, stop new test requests through the prepared control without deleting models, configuration or audit records.
Planned Checks And Recovery
Step 1: Map listeners and routes
Compare the configured bind address with reachable addresses from the proxy, permitted client VLAN and an untrusted VLAN. Identify IPv4/IPv6 and container-published paths actually in use. A firewall diagram alone is not proof that the backend cannot be reached.
Step 2: Separate the identities
Give ordinary clients only the intended inference permissions. Constrain model management, file access and tool execution separately. Verify authenticated TLS and trusted-proxy behavior along the permitted path; preserve a restricted administrative route.
Step 3: Run authorization checks before load
With non-sensitive requests, test missing/invalid credentials, unauthorized model enumeration and generation, and prohibited tool use. Check the backend logs as well as the client response. A proxy error is not enough if the same client can call a direct port.
Step 4: Exercise bounded limits and shutdown
Increase synthetic request size, context and concurrency only to the agreed ceiling. Record rejection, queue behavior and resource use. Test blocking new requests and restoring the intended restricted service without broadening the bind or disabling authentication.
Validation Checklist
- The permitted client can perform a small request and the untrusted VLAN cannot reach an unauthorized backend path.
- Missing/invalid credentials and prohibited management/tool requests are denied.
- Bounded oversize/concurrency tests are rejected or queued within the agreed resource envelope.
- Emergency restriction works and recovery preserves models, configuration, audit records and access policy.
Troubleshooting
- Proxy denies but backend works: Fix direct-listener/firewall exposure; stronger proxy authentication cannot cover a bypass.
- Small requests work but larger ones stall: Compare proxy limits, queueing and engine resource logs before enlarging all limits.
- Inference permissions also invoke tools: Separate the tool's credentials and permissions from ordinary generation and retest the denial.
Security, Privacy, Legal, And Recovery Boundaries
Security
Containers and application RBAC reduce risk but do not prove kernel, runtime, tool, model, or plugin isolation; use layered controls and negative tests.
Privacy
Prompts, files, embeddings, retrieved documents, tool output, and logs can expose confidential material to other users or administrators.
Legal
Confirm rights to models, documents, code, and generated output, and do not use production secrets or customer data in an unapproved test.
Recovery
Store configuration as code where practical, preserve only required state, and prove that the service can be destroyed and recreated without losing authoritative data.
Record any local exception, its owner, its expiration condition, and the evidence required to remove it.
What The Evidence Does Not Prove
Permission-key support is not proof that every installed endpoint is correctly restricted. No firewall/proxy configuration or sizing values are validated here, and a local-only model does not make its tool network calls local-only. Cross-VLAN and shutdown trials remain planned.
Related TechGeeks Resources
References
Next Action
Prove one allowed inference path and one denied direct-backend path first. Add tool access and larger request budgets only as separately tested permissions.

