# Remote addresses in log are all docker gateway

**URL:** <https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** reverseproxy, docker, bruteforce, real-ip\
**Created:** [February 26, 2024, 9:20am UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351 "2024-02-26T09:20:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![IndigoFloyd](https://help.nextcloud.com/user_avatar/help.nextcloud.com/indigofloyd/32/59360_2.png) [@IndigoFloyd](https://help.nextcloud.com/u/IndigoFloyd)\
**Post date:** [February 26, 2024, 9:20am UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/1 "2024-02-26T09:20:30Z")

</div>

I am using the latest docker image from dockerhub (apache2 version), running on my Raspberry Pi 4B. Recently, when I launched my Nextcloud APP and Photos APP I found there were a lot of warnings in the _nextcloud.log_ as follows:

 ![屏幕截图 2024-02-26 170013](https://help.nextcloud.com/uploads/default/original/3X/8/9/89ef0205725ab682490612ccb2024a704f8d301a.png)  
My server runs like:  
 ![屏幕截图 2024-02-26 171712](https://help.nextcloud.com/uploads/default/original/3X/5/1/510ada9916fb211bf94ec426df364a2f70c26fc1.png)  
I am very confused about how to show real IP from frpc. It does’t look like a frp error, because my Jellyfin are running in almost the same way and it could show the correct IP. Please help me 😭

---

<div class="post-metadata">

**Author:** ![IndigoFloyd](https://help.nextcloud.com/user_avatar/help.nextcloud.com/indigofloyd/32/59360_2.png) [@IndigoFloyd](https://help.nextcloud.com/u/IndigoFloyd)\
**Post date:** [February 26, 2024, 9:30am UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/2 "2024-02-26T09:30:33Z")

</div>

I try to use frpc to connect my cloud server, and my frpc.ini is as follows:

```auto
[nextcloud]
type = http
local_port = 8080
subdomain = cloud

```

As for the cloud server side, frps.ini is as follows:

```auto
[common]
bind_port = 2956
vhost_http_port = 7080
vhost_https_port = 7443
subdomain_host = xxxxxxx

```

and nginx.conf:

```auto
server {
        listen 443 ssl;
        server_name cloud.xxxxxx.com;
        ssl_certificate /usr/local/nginx/cert/.pem;
        ssl_certificate_key /usr/local/nginx/cert/.key;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;

        #ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        location / {
            #root html;
            #index index.html index.htm;
            proxy_pass http://127.0.0.1:7080;
            add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_max_temp_file_size 0;
            proxy_redirect off;
            proxy_read_timeout 240s;
        }

```

---

<div class="post-metadata">

**Author:** ![IndigoFloyd](https://help.nextcloud.com/user_avatar/help.nextcloud.com/indigofloyd/32/59360_2.png) [@IndigoFloyd](https://help.nextcloud.com/u/IndigoFloyd)\
**Post date:** [February 26, 2024, 9:40am UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/3 "2024-02-26T09:40:08Z")

</div>

My docker gateway is **172.17.0.1** , all of the remote addresses in my nextcloud log are that. I suspect maybe the default Apache config is wrong. But I have no idea where the config is either how to fix that. 😭

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [February 27, 2024, 10:56am UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/4 "2024-02-27T10:56:51Z")

</div>

welcome to the forum @IndigoFloyd 🤝

Please review you have all required [reverse proxy](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html) settings in place. Newer Docker images should have the fix built-in already but definitely worth following [Apache Docker behind reverse proxy](https://help.nextcloud.com/t/apache-docker-behind-reverse-proxy/151754)

#reverseproxy

---

<div class="post-metadata">

**Author:** ![IndigoFloyd](https://help.nextcloud.com/user_avatar/help.nextcloud.com/indigofloyd/32/59360_2.png) [@IndigoFloyd](https://help.nextcloud.com/u/IndigoFloyd)\
**Post date:** [February 27, 2024, 1:45pm UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/6 "2024-02-27T13:45:17Z")

</div>

> [@IndigoFloyd](#):
>
> Thank you for your kindly help. I tried to reset my Nginx config, and the wrong IP in the log somehow changed to **127.0.0.1**. Then I appended it to the **trusted\_proxies** array. Surprisingly I found it worked, and I thought maybe I have handled this problem. 😋

Thank you for your kindly help. I tried to reset my Nginx config, and the wrong IP in the log somehow changed to **127.0.0.1**. Then I appended it to the **trusted\_proxies** array. Surprisingly I found it worked, and I thought maybe I have handled this problem. 😋

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [February 27, 2024, 2:24pm UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/7 "2024-02-27T14:24:29Z")

</div>

if your Nginx runs on the same system this is expected and the setting you applied is right for #reverseproxy on the same system as Nextcloud (localhost)

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:42am UTC](https://help.nextcloud.com/t/remote-addresses-in-log-are-all-docker-gateway/183351/8 "2025-01-16T08:42:22Z")

</div>


