0

We're using Guacamole for RDP sessions, but as we have several workstations located around the city. Each time a user connects it returns:

ClientAddress: 10.0.0.1XX (Guacamole Server IP)
ClientName: Guacamole RDP

I need to know if there's a way for each connection to give me the IP and the real name of the workstation that connects through Guac.

E.x. Instead of 10.0.0.190 I need 192.168.1.XX and the ClientName TAG10 (every workstation has its own hostname.)

Thanks!

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90

1 Answers1

0

For guacamole version 1.0.0 and above, you will need to configure RemoteIpValve in your tomcat in order to see the source IP.

Firstly, make sure that your proxy send X-Forwarded-For header. For example (in nginx):

location /guacamole/ {
    proxy_pass http://HOSTNAME:8080/guacamole/;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    access_log off;
}

Next, configure RemoteIpValve in tomcat. It is used to pass through remote IP address to the application.

Go to tomcat conf directory, and edit this file (conf/server.xml). Under the <Host> section, add the following:

<Valve className="org.apache.catalina.valves.RemoteIpValve"
               internalProxies="127.0.0.1"
               remoteIpHeader="x-forwarded-for"
               remoteIpProxiesHeader="x-forwarded-by"
               protocolHeader="x-forwarded-proto" />

For more info, you may refer to here: Guacamole - Hostname logging within database

Song Lim
  • 298
  • 3
  • 11