# Flowfuse Dashboard SocketIp with wireguard

**URL:** <https://discourse.nodered.org/t/flowfuse-dashboard-socketip-with-wireguard/91278>\
**Category:** General\
**Created:** [26 September 2024 07:54 UTC](https://discourse.nodered.org/t/flowfuse-dashboard-socketip-with-wireguard/91278 "2024-09-26T07:54:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![buschhardtt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/buschhardtt/32/94239_2.png) [@buschhardtt](https://discourse.nodered.org/u/buschhardtt)\
**Post date:** [26 September 2024 07:54 UTC](https://discourse.nodered.org/t/flowfuse-dashboard-socketip-with-wireguard/91278/1 "2024-09-26T07:54:46Z")

</div>

Hello, I have the following problem:

I have two servers connected via WireGuard. Server 1 is running "Node-Red" with the FlowFuse Dashboard, while Server 2 is running an NGINX server.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5eccdd005b58818c8e61781c88fdecf97fb3381a.png)

Here's the NGINX configuration.

```auto
  location /dashboard {
    add_header X-Client-IP $remote_addr;
    proxy_pass http://10.0.0.2:1880/dashboard;
    proxy_http_version 1.1;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Port $server_port;
  }

```

When opening a dashboard page from the internet and checking the UI-control debug...

```auto
msg : Object
payload: "connect"
_client: object
{
  socketId: "bN9KYr7qntlYVpl_AAAB"
  socketIp: "10.0.0.1"
}
_msgid: "07e64a4f673bc9d3"

```

Do you know how I can get the real IP address into the `socketIp` (or any other method)?

Thank you!

---

<div class="post-metadata">

**Author:** ![WhiteLion](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/whitelion/32/12266_2.png) [@WhiteLion](https://discourse.nodered.org/u/WhiteLion)\
**Post date:** [26 September 2024 21:24 UTC](https://discourse.nodered.org/t/flowfuse-dashboard-socketip-with-wireguard/91278/2 "2024-09-26T21:24:10Z")

</div>

> [@buschhardtt](#):
>
> Do you know how I can get the real IP address into the `socketIp` (or any other method)?
> 
> Thank you!

For the network the Wireguard IP is the real IP. I think the only way it to submit the LAN IP from the Nginx server somehow (dont know the possibilities of Nginx) to Node Red and replace socketIp value with the transmitted one with a function node.

---

<div class="post-metadata">

**Author:** ![kitori](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kitori](https://discourse.nodered.org/u/kitori)\
**Post date:** [27 September 2024 09:05 UTC](https://discourse.nodered.org/t/flowfuse-dashboard-socketip-with-wireguard/91278/3 "2024-09-27T09:05:44Z")

</div>

Because the NGINX reverse proxy makes a seperate http request to your backend, the real ip from the client is propably useless in the node-red backend.

The backend can't connect directly to the client, because there are not established connections from you backend to the client.  
(Please correct me if im wrong 🙈 )

Like @WhiteLion said, you can access the Headers from a function node **from a http in Node**

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/06664071993cc1f7bfa12187572039412a9fb3a6.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 December 2024 09:06 UTC](https://discourse.nodered.org/t/flowfuse-dashboard-socketip-with-wireguard/91278/4 "2024-12-26T09:06:22Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
