jwetzell / docker-guacamole

A self-contained guacamole docker container for x64 and ARM. Remotely connect over SSH, RDP or VNC using HTML5.
https://hub.docker.com/r/oznu/guacamole/
GNU General Public License v3.0
104 stars 17 forks source link

Remote Host IP #23

Closed kaasszje closed 10 months ago

kaasszje commented 10 months ago

Describe Your Problem: I running Guacamole in docker, in front of this is a reverse proxy (nginx proxy manager) In history tab I see all connections from a docker internal IP. I wish to see the real client ip from which a client connectst

Settings in nginx proxy manager for X-Forwarded-For are set. In guacamole I only added the totp extention. So how can I get the client IP ?

jwetzell commented 10 months ago

I just did a quick test adding the valve mentioned here to the server.xml for tomcat located at /usr/local/tomcat/conf/server.xml in the container. And that seems to do the trick on my instance of Guacamole. Should be possible to do without rolling a new image, but could also just be rolled into the image itself probably.

kaasszje commented 10 months ago

Extracted the server.xml and made the adjustments, recreated the image with the new server.xml and this work, so thank you very much.

nescafe2002 commented 1 day ago

For anyone interested, I solved this by extracting server.xml, modifying the Valve section and mounting the file using docker compose:

  1. docker cp guacamole:/usr/local/tomcat/conf/server.xml .
  2. vi server.xml
  3. Add <Valve> section to <Host>

docker-compose.yml:

services:
  app:
    container_name: guacamole
    image: jwetzell/guacamole
    volumes:
      - /containers/guacamole/data:/config
      - /containers/guacamole/server.xml:/usr/local/tomcat/conf/server.xml
    ports:
      - 8080:8080/tcp
    network_mode: bridge