# is_private_ip

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/_security/_ssrf_protection/is_private_ip)

Check if an IP address is in a private range.

## Signature

```python
is_private_ip(
    ip_str: str,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `ip_str` | `str` | Yes | IP address as a string (e.g., "192.168.1.1") |

## Returns

`bool`

True if IP is in a private range, False otherwise

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/_security/_ssrf_protection.py#L97)