# Why do I see a lot of TLS handshake errors in my Portainer and/or Agent logs?

This can occur when either the Portainer Server or your Portainer Agents are exposed to the public internet, and are being subjected to port scanners.

We highly recommend restricting access to your Portainer deployments to only the IPs that are required for access by using a firewall or other ACL mechanism to limit access.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.portainer.io/faqs/troubleshooting/logs-errors-and-debugging/why-do-i-see-a-lot-of-tls-handshake-errors-in-my-portainer-and-or-agent-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
