> For the complete documentation index, see [llms.txt](https://docs.gptboost.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gptboost.io/security/methods/block-only-ips.md).

# Block Only IPs

"Block Only Given IPs" is your shield against known threats. Here's why it's crucial:

* **Preventing requests from unauthorized users**: Teams can use the Block Only Given IPs policy to prevent requests from unauthorized users, such as competitors or malicious actors. This can help to protect the LLM from unauthorized access and use.
* **Blocking requests from known malicious IP addresses**: Teams can use the Block Only Given IPs policy to block requests from known malicious IP addresses, such as IP addresses that have been associated with spam or phishing attacks. This can help to protect against a variety of security threats.

### How to set Block Only IPs policy?

* Sign in to your GPTBoost dashboard and navigate to the `Security` section. \*
* Hit the `+ Add Policy` button
* Pick a meaningful and self-explanatory N**ame** for the policy. Choose the **Policy Type** - Allow Only Policy or Block Only Policy. Provide the IPs that you want to whitelist or block, depending on the policy type you selected.

<figure><img src="/files/kRvUuwIzbMWcSKcF4qgi" alt=""><figcaption><p>Set Block Only IPs Policy</p></figcaption></figure>

\* Keep in mind that the IP Security feature is available for the **GPTBoost Upgraded Plans**. If you're still on the free tier, simply log in to your GPTBoost account and navigate to `UPGRADE` button at the end of the menu.

### Add your additional level of security to the OpenAI Key

* Go to **OpenAI Keys**.
* Initiate `Edit` for the key you'll add the newly created Allow Only IPs rules.
* Instead of the Default - Open Policy, select the preferred one from your custom set IP policies.
* Click `Save`

<figure><img src="/files/8XR7F8wx2fRC8WpwxmDq" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.gptboost.io/security/methods/block-only-ips.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
