# Access Object Storage from a Private LAN

Using an Object Storage endpoint with a [<mark style="color:blue;">Managed Network Load Balancer (NLB)</mark>](https://docs.ionos.com/sections-test/guides/network-services/network-load-balancer) creates a secure connection to use <code class="expression">space.vars.ionos\_cloud\_object\_storage</code> within your work environment.

To access Object Storage from a private LAN using NLB, follow these steps:

{% hint style="info" %}
**Prerequisites:**

* Set up an NLB by following the steps in [<mark style="color:blue;">Create a NLB</mark>](https://docs.ionos.com/sections-test/guides/network-services/network-load-balancer/setup-nlb#create-an-nlb). If a load balancer already exists, then it has a private IP address.
* Use the public IP addresses of the desired [<mark style="color:blue;">Endpoints</mark>](https://docs.ionos.com/sections-test/guides/storage-and-backup/ionos-object-storage/endpoints) as the **Target IP** address.
  {% endhint %}

1\. In the **DCD**, select the NLB element to open its properties in the **Inspector** pane on the right.

2\. In the **Settings**, provide the information such as **Name**, **Primary IPv4**, and **Add IP** settings. Adding one or more Listener IPs is optional. For more information, see [<mark style="color:blue;">Settings</mark>](https://docs.ionos.com/sections-test/guides/network-services/network-load-balancer/configure-nlb#settings).

![NLB settings](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-123ab3da521c8867a8470947758ddf785cf80f4b%2Fobject-storage-nlb-configuration.png?alt=media)

{% hint style="info" %}
**Note:** Public IPs must be reserved first. You can reserve public IPs by following the steps in [<mark style="color:blue;">Reserve an IPv4 address</mark>](https://docs.ionos.com/sections-test/guides/network-services/vdc-networking/ip-address/ipv4/how-tos/reserve-ipv4).
{% endhint %}

3\. In the **Private IPs**, enter the private IP address and click **Add IP**. To do so, follow the steps in [<mark style="color:blue;">Add and delete IPs</mark>](https://docs.ionos.com/sections-test/guides/network-services/network-load-balancer/configure-nlb#add-and-delete-ips).

![Add private IP](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-8044ecdee528d47fe706f765de0a9f46b1c0e0ea%2Fobject-storage-nlb-private-ip.png?alt=media)

4\. In the **Forwarding rules**, **Add forwarding rule** as follows:

* **Listener IP:** Select the **Private IP** as the **Listener IP** of the forwarding rule.
* **Algorithm:** Choose any from the drop-down list.
* **Protocol:** Use **TCP**, which is the default value.

For more information on other configuration details for the forwarding rule, see [<mark style="color:blue;">Create a rule</mark>](https://docs.ionos.com/sections-test/guides/network-services/network-load-balancer/configure-nlb#create-a-rule).

![Configure Forwarding rules](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-2a767d306ee297ba4be78d7413621acaa9856887%2Fobject-storage-nlb-forwarding-rule.png?alt=media)

5\. In the **Add target**, configure using these values:

* **Target IP:** Select a corresponding Target IP value that is the public IP address of the desired endpoint.

Following is the example of IP address values obtained for the endpoints:

| Endpoint                         | Target IP Address |
| -------------------------------- | ----------------- |
| `s3.eu-central-4.ionoscloud.com` | `212.227.23.250`  |
| `s3.eu-central-3.ionoscloud.com` | `85.215.142.30`   |
| `s3.eu-central-1.ionoscloud.com` | `81.173.115.249`  |
| `s3.eu-central-2.ionoscloud.com` | `85.215.240.253`  |
| `s3.eu-south-2.ionoscloud.com`   | `93.93.114.231`   |
| `s3.us-central-1.ionoscloud.com` | `74.208.241.159`  |

* **Target port:** Use the value 443. This is the specific port on which a service or application is running on a server.
* **Weight:** Enter a target weight from 1 to 256.
* **Proxy Protocol:** Choose `none` for disabling the proxy protocol.

For more information on other configuration details of the target, see [<mark style="color:blue;">Create a target</mark>](https://docs.ionos.com/sections-test/guides/network-services/network-load-balancer/configure-nlb#create-a-target).

![Add target](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-9de4b25ec3637ec53a1f9850462b6229e2f5ca7b%2Fobject-storage-nlb-add-target.png?alt=media)

6\. Click **PROVISION CHANGES** to save the configurations and apply them.

7\. Configure `/etc/hosts` on the backend server. For example, run the following command to open the file with sudo privileges:`sudo nano /etc/hosts`.

* Edit the file `/etc/hosts` by adding a new line with a private listener IP address followed by the endpoint. This will map a specific domain to the private IP address of your NLB.

Example:

```bash

10.10.0.1 s3.eu-central-3.ionoscloud.com

```

{% hint style="success" %}
**Result:** The private LAN using NLB is successfully set up to access Object Storage.
{% endhint %}
