You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Liv Pet <li...@gmail.com> on 2018/08/22 10:33:31 UTC

${GUAC_CLIENT_HOSTNAME} expansion in

Hi,

I want to record sessions using custom filenames. I configured
recording-name (SCREEN RECORDING) via web interface like that:
myhost-${GUAC_USERNAME}@${GUAC_CLIENT_HOSTNAME} and the recorded file has
that name: myhost-user@0:0:0:0:0:0:0:1.1 . Please, if anyone knows, tell me
how I can solve the correct expansion of $ {GUAC_CLIENT_HOSTNAME} in name or
IP. 
Thank you.




--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

Re: ${GUAC_CLIENT_HOSTNAME} expansion in

Posted by Liviu Petcu <li...@gmail.com>.
Hi,

As you said, it was enough to configure RemoteIPValve in Tomcat's
server.xml like this:

<Valve
   className="org.apache.catalina.valves.RemoteIpValve"
   internalProxies="127\.0\.0\.1|0:0:0:0:0:0:0:1"
   remoteIpHeader="x-forwarded-for"
   proxiesHeader="x-forwarded-by"
   trustedProxies="proxy1|proxy2"
   />

and now I have correct expansion of  $ {GUAC_CLIENT_HOSTNAME}  variable.

Thank you.


On Fri, Aug 24, 2018 at 8:18 AM Liviu Petcu <li...@gmail.com> wrote:

> Thank you. I will follow your advice and return with the result.
>
> Liv
>
>
> On Wed, Aug 22, 2018 at 3:33 PM Nick Couchman <vn...@apache.org> wrote:
>
>> On Wed, Aug 22, 2018 at 6:33 AM Liv Pet <li...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I want to record sessions using custom filenames. I configured
>>> recording-name (SCREEN RECORDING) via web interface like that:
>>> myhost-${GUAC_USERNAME}@${GUAC_CLIENT_HOSTNAME} and the recorded file
>>> has
>>> that name: myhost-user@0:0:0:0:0:0:0:1.1 . Please, if anyone knows,
>>> tell me
>>> how I can solve the correct expansion of $ {GUAC_CLIENT_HOSTNAME} in
>>> name or
>>> IP.
>>> Thank you.
>>
>>
>> Two things to look at, here:
>> - First, if you're using a proxy in front of Apache Tomcat (or JBOSS,
>> Jetty, etc.) you need to make sure you have properly configured it to pass
>> through the remote host/address headers.  Otherwise you'll end up with what
>> you see, here, which is the IPv6 representation of the "localhost"
>> address.  Look at the manual page regarding proxying and make sure you have
>> the headers passed through correctly:
>> http://guacamole.apache.org/doc/gug/proxying-guacamole.html.  Also, you
>> might need to adjust Tomcat's configuration with the "remoteIpValve" to
>> allow those IP addresses to be passed through.
>> - Also, there was a JIRA issue raised dealing with making the handling of
>> the remoteHost/remoteAddress processing more consistent in Guacamole:
>> https://issues.apache.org/jira/browse/GUACAMOLE-540.  The changes from
>> that issue are in the Git repo and are scheduled to be released with
>> version 1.0.0.
>>
>> -Nick
>>
>

Re: ${GUAC_CLIENT_HOSTNAME} expansion in

Posted by Liviu Petcu <li...@gmail.com>.
Thank you. I will follow your advice and return with the result.

Liv


On Wed, Aug 22, 2018 at 3:33 PM Nick Couchman <vn...@apache.org> wrote:

> On Wed, Aug 22, 2018 at 6:33 AM Liv Pet <li...@gmail.com> wrote:
>
>> Hi,
>>
>> I want to record sessions using custom filenames. I configured
>> recording-name (SCREEN RECORDING) via web interface like that:
>> myhost-${GUAC_USERNAME}@${GUAC_CLIENT_HOSTNAME} and the recorded file has
>> that name: myhost-user@0:0:0:0:0:0:0:1.1 . Please, if anyone knows, tell
>> me
>> how I can solve the correct expansion of $ {GUAC_CLIENT_HOSTNAME} in name
>> or
>> IP.
>> Thank you.
>
>
> Two things to look at, here:
> - First, if you're using a proxy in front of Apache Tomcat (or JBOSS,
> Jetty, etc.) you need to make sure you have properly configured it to pass
> through the remote host/address headers.  Otherwise you'll end up with what
> you see, here, which is the IPv6 representation of the "localhost"
> address.  Look at the manual page regarding proxying and make sure you have
> the headers passed through correctly:
> http://guacamole.apache.org/doc/gug/proxying-guacamole.html.  Also, you
> might need to adjust Tomcat's configuration with the "remoteIpValve" to
> allow those IP addresses to be passed through.
> - Also, there was a JIRA issue raised dealing with making the handling of
> the remoteHost/remoteAddress processing more consistent in Guacamole:
> https://issues.apache.org/jira/browse/GUACAMOLE-540.  The changes from
> that issue are in the Git repo and are scheduled to be released with
> version 1.0.0.
>
> -Nick
>

Re: ${GUAC_CLIENT_HOSTNAME} expansion in

Posted by Nick Couchman <vn...@apache.org>.
On Wed, Aug 22, 2018 at 6:33 AM Liv Pet <li...@gmail.com> wrote:

> Hi,
>
> I want to record sessions using custom filenames. I configured
> recording-name (SCREEN RECORDING) via web interface like that:
> myhost-${GUAC_USERNAME}@${GUAC_CLIENT_HOSTNAME} and the recorded file has
> that name: myhost-user@0:0:0:0:0:0:0:1.1 . Please, if anyone knows, tell
> me
> how I can solve the correct expansion of $ {GUAC_CLIENT_HOSTNAME} in name
> or
> IP.
> Thank you.


Two things to look at, here:
- First, if you're using a proxy in front of Apache Tomcat (or JBOSS,
Jetty, etc.) you need to make sure you have properly configured it to pass
through the remote host/address headers.  Otherwise you'll end up with what
you see, here, which is the IPv6 representation of the "localhost"
address.  Look at the manual page regarding proxying and make sure you have
the headers passed through correctly:
http://guacamole.apache.org/doc/gug/proxying-guacamole.html.  Also, you
might need to adjust Tomcat's configuration with the "remoteIpValve" to
allow those IP addresses to be passed through.
- Also, there was a JIRA issue raised dealing with making the handling of
the remoteHost/remoteAddress processing more consistent in Guacamole:
https://issues.apache.org/jira/browse/GUACAMOLE-540.  The changes from that
issue are in the Git repo and are scheduled to be released with version
1.0.0.

-Nick