#### [Abblix\.Utils](https://www.abblix.com/en/docs/api/abblix-utils 'index')
### [Abblix\.Utils](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils 'Abblix\.Utils')

## PrivateNetworks Class

Tells an address inside the deployment's own network from one on the public internet\.

```csharp
public static class PrivateNetworks
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → PrivateNetworks

### Remarks
Whenever a server is made to call an address that arrived from outside, this is the question that decides
whether the call is a feature or a server\-side request forgery\. More than one package asks it, which is why the
answer lives here rather than beside any one of them: a range added to the list below has to take effect
everywhere at once, and a second copy of these rules would drift silently, since neither copy fails when they
disagree\.

"Private" is this type's term and it is wider than the RFC 1918 ranges the phrase usually names: it covers
everything a server-initiated request has no business reaching, so loopback, link-local (where a cloud's
metadata service lives), carrier-grade NAT, multicast and the unspecified address count too, as do hostnames
that resolve inside a network rather than on the internet.

What surrounds the question stays with each caller: which schemes are allowed, whether the check applies at
all, and which destinations an operator has deliberately permitted are policy, and policy differs by feature.
### Methods

## PrivateNetworks\.IsPrivateHostname\(string\) Method {#Abblix.Utils.PrivateNetworks.IsPrivateHostname(string)}

Reports whether a hostname belongs to a network rather than to the internet\.

```csharp
public static bool IsPrivateHostname(string hostname);
```
#### Parameters

###### `hostname` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Utils.PrivateNetworks.IsPrivateHostname(string).hostname}

The host component of the address about to be reached\.

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')  
True when the name should not be reached from a server\-initiated request\.

## PrivateNetworks\.IsPrivateOrReservedAddress\(IPAddress\) Method {#Abblix.Utils.PrivateNetworks.IsPrivateOrReservedAddress(System.Net.IPAddress)}

Reports whether an IP address is private, loopback, link\-local or otherwise reserved\.

```csharp
public static bool IsPrivateOrReservedAddress(System.Net.IPAddress address);
```
#### Parameters

###### `address` [System\.Net\.IPAddress](https://learn.microsoft.com/en-us/dotnet/api/system.net.ipaddress 'System\.Net\.IPAddress') {#Abblix.Utils.PrivateNetworks.IsPrivateOrReservedAddress(System.Net.IPAddress).address}

The address a name resolved to, or the literal in the URI\.

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')  
True when the address belongs to the deployment's own network rather than the internet\.
