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

remoteip.conf config not suitable for intranet #1068

Closed
jsalatiel opened this issue Apr 9, 2020 · 3 comments
Closed

remoteip.conf config not suitable for intranet #1068

jsalatiel opened this issue Apr 9, 2020 · 3 comments

Comments

@jsalatiel
Copy link

The defautl configuration for /etc/apache2/conf-enabled/remoteip.conf in nextcloud-apache docker image contains:

RemoteIPHeader X-Real-IP
RemoteIPTrustedProxy 10.0.0.0/8
RemoteIPTrustedProxy 172.16.0.0/12
RemoteIPTrustedProxy 192.168.0.0/16

Please replace the RemoteIPTrustedProxy directive for RemoteIPInternalProxy directive.
RemoteIPTrustedProxy will ignore X-Real-IP for private addresses , so If you are connecting inside intranet with a private IP, the real IP will not show on the logs , only the proxy will show. If you change the directive, the client IP will appear in the logs as expected.

@kesselb
Copy link
Contributor

kesselb commented Apr 13, 2020

I suggest to turn remoteip off, configure trusted proxies and make sure the pass the original ip address as x-forwarded-for.

@jsalatiel
Copy link
Author

Hi kesselb, Maybe that fixes IP for nextcloud instance , but it will keep apache logs with the wrong ip.

@J0WI
Copy link
Contributor

J0WI commented Jun 5, 2020

Closing in favor of #1103

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

No branches or pull requests

3 participants