[ 
https://issues.apache.org/jira/browse/GUACAMOLE-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17930400#comment-17930400
 ] 

Per von Zweigbergk commented on GUACAMOLE-2037:
-----------------------------------------------

I have submitted two pull requests, one for the actual guacd Dockerfile, and 
one for the documentation:

[https://github.com/apache/guacamole-server/pull/578|https://github.com/apache/guacamole-manual/pull/267]

[https://github.com/apache/guacamole-manual/pull/267]

I decided to make the listen address configurable. The reasoning is that this 
will not break any existing setups, while still enabling the default to be 
changed in the future (setting the variable to revert back to the old 
behaviour.)

As I noted in the documentation, this feature by itself is not useful to set 
LISTEN_ADDRESS to anything but 0.0.0.0 or ::, and if you do, you will end up 
breaking the health check that's hard coded to connect to 127.0.0.1. This works 
fine even when binding to ::, but will break if you try binding to a specific 
IP, but I don't think that's a use case we need to support anyway, which is why 
I decided not to make the health check IP configurable.

> Make guacd Docker configurable for IPv6
> ---------------------------------------
>
>                 Key: GUACAMOLE-2037
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-2037
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: guacd-docker
>         Environment: Ubuntu 24.04 LTS with Docker version 28.0.0, build 
> f9ced58, with ipv6-only docker and host networking
>            Reporter: Per von Zweigbergk
>            Priority: Minor
>         Attachments: guacd-docker-ipv6.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> guacd-docker is hardcoded to launch guacd, binding to 0.0.0.0, which is not 
> configurable using an environment variable.
> This breaks in case you want to use guacd in an environment with IPv6, for 
> example in the case where you're using IPv6-only container networking.
> Fortunately, the fix should just be a matter of changing the CMD in the 
> Dockerfile to listen on :: instead of 0.0.0.0. This lets guacd respond to 
> both IPv4 and IPv6 connections.
> I have attached a patch that does this.
> As a workaround, it's possible to specify a different entrypoint when 
> launching guacd, as per this docker-compose.yml snippet, but this isn't 
> really a great way of doing things, because it ends up hardcoding an 
> implementation detail into configuration.
> {{services:
>   # guacd
>   guacd:
>     container_name: guacd_compose
>     image: docker.io/guacamole/guacd
>     command: "/opt/guacamole/sbin/guacd -b :: -L info -f"
>     networks:
>       - guacnetwork_compose
>     restart: always
>     volumes:
>     - ./drive:/drive:rw
>     - ./record:/record:rw
> }}
> As an alternative, it would also be possible to expose an environment 
> variable to explicitly enable IPv6 support, but I think just changing the 
> hardcoded default should be fine, and, while this might be a case of me 
> having limited imagination, I can not think of any way it could break.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to