Difference between revisions of "Apache Guacamole"

2,713 bytes added ,  02:36, 21 August 2022
 
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Apache Guacamole is a self hosted web application for Remote Desktop services. Guacamole allows remote desktop services to be accessed over HTTP.
Apache Guacamole is a [[Self hosted applications|Self hosted application]] for Remote Desktop services. Guacamole allows remote desktop services to be accessed over HTTP.


The main page for Apache Guacamole can be accessed here:
The main page for Apache Guacamole can be accessed here:


https://guacamole.apache.org/
https://guacamole.apache.org/
== Installation ==
==Guacamole Installation ==
This guide is best suited for a Guacamole installation on Ubuntu Server 20.04 LTS
This guide is best suited for a Guacamole installation on [[Ubuntu | Ubuntu Server 20.04 LTS]]


'''Run as Root'''
'''Run as Root'''
Line 25: Line 25:
'''Install tomcat9'''
'''Install tomcat9'''


<code?sudo apt install tomcat9 -y</code>
<code>sudo apt install tomcat9 -y</code>


'''Enable tomcat'''
'''Enable tomcat'''
Line 77: Line 77:
'''Set Up MySQL Connector'''
'''Set Up MySQL Connector'''


<code>wget https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-auth-jdbc-1.4.0.tar.gz</code>
<code>wget &lt;/nowiki&gt;https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-auth-jdbc-1.4.0.tar.gz</code>


<code>tar -xf guacamole-auth-jdbc-1.4.0.tar.gz</code>
<code>tar -xf guacamole-auth-jdbc-1.4.0.tar.gz</code>


<code>cd guacamole-auth-jdbc-1.4.0/mysql/<code>
<code>cd guacamole-auth-jdbc-1.4.0/mysql/</code>


<code>cat schema/*.sql | mysql -u root -p guacamole_db</code>
<code>cat schema/*.sql | mysql -u root -p guacamole_db</code>
Line 97: Line 97:
<code>exit</code>
<code>exit</code>


== 2nd section title ==
<code>cd guacamole-auth-jdbc-1.4.0/mysql/</code>
text
 
== See also ==
<code>cp guacamole-auth-jdbc-mysql-1.4.0.jar /etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar</code>
 
<code>wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java_8.0.28-1ubuntu20.04_all.deb</code>
== References ==
 
<references />
<code>dpkg -i mysql-connector-java_8.0.28-1ubuntu20.04_all.deb</code>
== Bibliography ==
 
* {{cite book
<code>cp /usr/share/java/mysql-connector-java-8.0.28.jar /etc/guacamole/lib/mysql-connector.jar</code>
|last      =
 
|first    =
'''Edit Guac config to work with MySQL'''
|title    = title
 
|publisher =
Edit guacamole.properties
|editor    =
 
|url      =  
<code>nano /etc/guacamole/guacamole.properties</code>
|year      =  
 
|place    =  
Add the following:
|isbn      =  
 
}}
<code>mysql-hostname: localhost<br />mysql-port: 3306<br />mysql-database: guacamole_db<br />mysql-username: guacamole_user<br />mysql-password: StrongPassword</code>
* {{cite book
 
|last      =  
Edit guacd.conf:
|first    =  
 
|title    = title
<code>nano /etc/guacamole/guacd.conf</code>
|publisher =
 
|editor    =
Add the following:
|url      =  
 
|year      =  
<code>[server]<br />bind_host = 0.0.0.0<br />bind_port = 4822</code>
|place    =  
 
|isbn      =  
'''Restart Services'''
}}
 
== External links ==
<code>sudo systemctl restart tomcat9 guacd</code>
 
'''Get Guacamole client'''
 
<code>wget https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war<br />mv guacamole-1.4.0.war guacamole.war<br />cp guacamole.war /var/lib/tomcat9/webapps<br />ls /var/lib/tomcat9/webapps</code>
 
 
'''Edit tomcat server Config'''
 
<code>nano /etc/tomcat9/server.xml</code>
 
Add the following:
 
<pre>
<Valve className="org.apache.catalina.valves.RemoteIpValve"
            internalProxies="127.0.0.1"
            remoteIpHeader="x-forwarded-for"
            remoteIpProxiesHeader="x-forwarded-by"
            protocolHeader="x-forwarded-proto" />
</pre>
 
'''Restart tomcat9'''
 
<code>sudo systemctl restart tomcat9</code>
 
 
Apache Guacamole should now be installed and reachable at <code>http://localhost:8080/guacamole</code>
 
The default sign in credentials are username:<code>guacadmin</code> password:<code>guacadmin</code>
 
==Add TOTP Authentication ==
Download the TOTP extension for Apache Guacamole and install it to the extensions folder:
 
<code>wget <nowiki>https://dlcdn.apache.org/guacamole/1.4.0/binary/guacamole-auth-totp-1.4.0.tar.gz</nowiki></code>
 
<code>tar -zxf guacamole-auth-totp-1.4.0.tar.gz guacamole-auth-totp-1.4.0/guacamole-auth-totp-1.4.0.jar</code>
 
<code>mv guacamole-auth-totp-1.4.0/guacamole-auth-totp-1.4.0.jar /etc/guacamole/extensions/</code>
 
<code>systemctl restart tomcat9</code>
==Fix RDP Connection Issues ==
If you have connection issues, fix by adding a guacd user:
 
<code>useradd -M -d /var/lib/guacd/ -r -s /sbin/nologin -c "Guacd User" guacd</code>
 
<code>mkdir /var/lib/guacd</code>
 
<code>chown -R guacd: /var/lib/guacd</code>
 
<code>sed -i 's/daemon/guacd/' /etc/systemd/system/guacd.service</code>
 
<code>systemctl daemon-reload</code>
 
<code>systemctl restart guacd</code>
 
==See also ==
* [[Reverse Proxy]]
* [[Apache Web Server]]
==References ==
*https://adamtheautomator.com/apache-guacamole/
*https://kifarunix.com/install-guacamole-on-debian-11/#fix-rdp-security-negotiation-failed
*https://kifarunix.com/configure-totp-two-factor-authentication-on-apache-guacamole/
==Bibliography ==
==External links ==
{{DEFAULTSORT:}}
{{DEFAULTSORT:}}
Anonymous user