Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get docker install to recognise that I'm outside of local network. #1967

Open
smarthome-enthusiast opened this issue Feb 14, 2024 · 9 comments

Comments

@smarthome-enthusiast
Copy link

Organizr Version: V 2.1.2460
Branch: Master
WebServer: Nginx-fpm:enabled
Operating System: Synology 7.2 + Official Docker Image

Problem Description:

TL;DR: I am unable to get Official Docker image to see that I am outside of local network and use Tab URL instead of local tab URL on Synology/DSM 7.2

I've set the local tab ip for internal 192.168.x.x and tab url to an accessible external address however when using Organizr from an external IP (100.x.x.x), none of the tabs work as it is using the Local Tab URLs to connect.

I have:

  1. set the Override Local IP or Subnet to match 192.168.x.x CIDR in Organizr Login Settings.
  2. checked the debug area and it shows that Local: true even though I am not on that subnet.
  3. checked the logs and it shows all activities are from 172.x.x.x .
  4. set the correct "Real Docker IP" range in default site config.
  5. tried the following fix from Pedro Lamas but it didn't work.
    Link: https://www.pedrolamas.com/2020/11/04/exposing-the-client-ips-to-docker-containers-on-synology-nas/
  6. set Synology's Trusted Proxies setting to both Docker IP and Local IP of NAS
  7. allowed traffic to subnet on Firewall.
  8. used the test.php in issue Problem getting Organizr to observe me being out of network, uses local URLs.  #1836 and can not find the PHP Variables:

image

Originally posted by @causefx in #1836 (comment)

Is there something I am missing or haven't enabled? Is the image already set up to forward IPs?

I am somewhat familiar with Docker and CLI, but not an expert. I am a complete novice at web servers so any help with instructions would be appreciated

@HalianElf
Copy link
Sponsor Collaborator

That link you linked should be what you need. I would try going through that again since that's the only way you're going to get it to see the correct IP (and there's no way for Organizr to detect it when it's getting the wrong info).

@smarthome-enthusiast
Copy link
Author

That link you linked should be what you need. I would try going through that again since that's the only way you're going to get it to see the correct IP (and there's no way for Organizr to detect it when it's getting the wrong info).

I took another look at the link (If I understood correctly, you are referring to no. 8?), and it seems like these are the only PHP HTTP Variables that I'm getting:

image

I can't seem to locate the HTTP_X_REAL_IP or HTTP_X_FORWARDED_FOR variables.

@HalianElf
Copy link
Sponsor Collaborator

No this one with the iptables stuff: https://www.pedrolamas.com/2020/11/04/exposing-the-client-ips-to-docker-containers-on-synology-nas/

It's getting the wrong IP because syno isn't properly NATing it so it's showing the from as the docker gateway

@smarthome-enthusiast
Copy link
Author

No this one with the iptables stuff: https://www.pedrolamas.com/2020/11/04/exposing-the-client-ips-to-docker-containers-on-synology-nas/

It's getting the wrong IP because syno isn't properly NATing it so it's showing the from as the docker gateway

Thanks for getting back to me so quickly! I went ahead and ran the script again, and now I can find the Variables:

image

But it is still showing that I am Local:

image

@HalianElf
Copy link
Sponsor Collaborator

That definitely looks better. Are you setting an override for local IPs? 100.x.x.x should be considered remote

@smarthome-enthusiast
Copy link
Author

smarthome-enthusiast commented Feb 16, 2024

Yes I've set the "Override Local IP or Subnet" to 192.x.x.x and 100.x.x.x should be considered as remote, but it still isn't. I've also noticed that it's still reporting my IP as 172.x.x.x, is this something I should be concerned about?

image

image

image

image

Edit: added screenshots and made original post clearer

@smarthome-enthusiast
Copy link
Author

That definitely looks better. Are you setting an override for local IPs? 100.x.x.x should be considered remote

Am I supposed to fill in the WAN domain and Enable Local Address Forward when setting an override for local IPs?

@HalianElf
Copy link
Sponsor Collaborator

You shouldn't be changing the override at all, it all ready contains all the RFC-1918 space and no you don't need do that, that's just for switching urls for Organizr when you're local.

Copy link

github-actions bot commented Mar 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants