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

Last ip address 127.0.0.1 #119

Open
rubenrodr-versia opened this issue Aug 23, 2017 · 5 comments
Open

Last ip address 127.0.0.1 #119

rubenrodr-versia opened this issue Aug 23, 2017 · 5 comments

Comments

@rubenrodr-versia
Copy link

rubenrodr-versia commented Aug 23, 2017

Hi,

We have the following nginx config:
server {
listen 443;
ssl on;
ssl_certificate /opt/doorman/certificate.crt;
ssl_certificate_key /opt/doorman/private.key;

location / {
proxy_pass https://127.0.0.1:5000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

The nginx access.log is showing the node real ip address:

10.191.29.207 - - [23/Aug/2017:16:15:18 +0200] "POST /enroll HTTP/1.1" 200 82 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:18 +0200] "POST /config HTTP/1.1" 200 169 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:18 +0200] "POST /distributed/read HTTP/1.1" 200 45 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:23 +0200] "POST /log HTTP/1.1" 200 27 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:28 +0200] "POST /config HTTP/1.1" 200 169 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:28 +0200] "POST /distributed/read HTTP/1.1" 200 45 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:28 +0200] "POST /log HTTP/1.1" 200 27 "-" "osquery/2.7.0"
10.191.29.207 - - [23/Aug/2017:16:15:33 +0200] "POST /log HTTP/1.1" 200 27 "-" "osquery/2.7.0"

The nodes registers without any problems, but ip addresses are always 127.0.0.1 and node characteristics are missing:

captura de pantalla de 2017-08-23 16-20-57

Thanks in advance.

@rubenrodr-versia
Copy link
Author

Hi,

Node characteristics are showing fine after setting a query to get the information:

image

But still the same with the ip addresses.

Thanks.
Best regards.

@rubenrodr-versia
Copy link
Author

Hi,

We have tried stoping nginx and redirecting the port with socat:
socat TCP-LISTEN:443,fork,reuseaddr TCP:localhost:5000
But still the same issue.

Thanks.
Best regards.

@mwielgoszewski
Copy link
Owner

Hi @rubenrodr-versia -

Can you update nginx config to set:

proxy_set_header X-Forwarded-For $remote_addr;

and reload Doorman?

@rubenrodr-versia
Copy link
Author

Hi Marcin,

We have test with the specified parameter on nginx config:

server {
listen 443;
ssl on;
ssl_certificate /opt/doorman/certificate.crt;
ssl_certificate_key /opt/doorman/private.key;

location / {
proxy_pass https://127.0.0.1:5000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

but still the same result.

Thanks.
Best regards.

@aditya-pr
Copy link
Contributor

I am having the same problem. Last ip is always ip of proxy I am using.

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