Guacamole est une passerelle de bureau à distance sans client. Elle supporte les protocoles standards comme VNC, RDP et SSH. Une fois Guacamole installé sur un serveur, tout ce dont vous avez besoin pour accéder à vos bureaux est un navigateur web.
Dépendances
1 2 3 |
apt install -y gcc-6 g++-6 libcairo2-dev libjpeg-turbo8-dev libpng-dev libossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libvncserver-dev libssl-dev libvorbis-dev libwebp-dev libtelnet-dev libmysql-java freerdp2-dev libpulse-dev libtool-bin libwebsockets-dev |
Installation de Tomcat
1 |
apt install tomcat8 tomcat8-admin tomcat8-common tomcat8-user -y |
1 2 |
ufw allow 8080 ufw reload |
Installation du serveur Guacamole
Télécharger guacamole-server-1.1.0.tar.gz
1 2 3 |
tar xzf guacamole-server-1.1.0.tar.gz cd guacamole-server-1.1.0 autoreconf -fi |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
./configure --with-init-dir=/etc/init.d Library status: freerdp2 ............ yes pango ............... yes libavcodec .......... yes libavutil ........... yes libssh2 ............. yes libssl .............. yes libswscale .......... yes libtelnet ........... yes libVNCServer ........ yes libvorbis ........... yes libpulse ............ yes libwebsockets ....... yes libwebp ............. yes wsock32 ............. no Protocol support: Kubernetes .... yes RDP ........... yes SSH ........... yes Telnet ........ yes VNC ........... yes Services / tools: guacd ...... yes guacenc .... yes guaclog .... yes |
1 2 3 4 5 |
make make install ldconfig systemctl enable guacd systemctl start guacd |
Installation du client Guacamole sur le serveur
Télécharger guacamole-1.1.0.war
1 2 3 4 5 |
mkdir /etc/guacamole mv guacamole-1.1.0.war /etc/guacamole/guacamole.war ln -s /etc/guacamole/guacamole.war /var/lib/tomcat8/webapps/ systemctl restart tomcat8 systemctl restart guacd |
Configuration de la connexion sécurisée
Récupération du certificat SSL
1 2 3 4 5 6 7 8 |
apt-get update apt-get install software-properties-common add-apt-repository universe add-apt-repository ppa:certbot/certbot apt-get update apt-get install certbot python-certbot-apache sudo certbot certonly --apache certbot renew --dry-run |
Création du reverse proxy Apache
1 |
apt-get install apache2 |
1 |
vi /etc/apache2/sites-available/guacamole.conf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<VirtualHost *:80> <VirtualHost *:80> ServerName votre-serveur.fr RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] </VirtualHost> <IfModule mod_ssl.c> <VirtualHost _default_:443> SSLEngine on SSLCertificateFile chemin vers la clef fullchain.pem SSLCertificateKeyFile chemin vers la clef privkey.pem ProxyPreserveHost On ProxyRequests On ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080 </VirtualHost> </IfModule> |
1 |
systemctl restart apache2 |
Installation de l’authentification mysql
1 2 3 |
mkdir /etc/guacamole/extensions mkdir /etc/guacamole/lib ln -s /usr/share/java/mysql-connector-java.jar /etc/guacamole/lib/ |
Télécharger l’extension mysql guacamole-auth-jdbc-1.1.0.tar.gz
1 2 |
tar -xvf guacamole-auth-jdbc-1.1.0.tar.gz cp guacamole-auth-jdbc-1.1.0/mysql/guacamole-auth-jdbc-mysql-1.1.0.jar /etc/guacamole/extensions/ |
Création de la base de donnée
1 2 |
apt install mysql-server mysql_secure_installation |
1 2 3 4 5 6 |
mysql -u root -p create database guacamole_db; create user 'guacamole_user'@'localhost' identified by 'P@$$w0rd'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost'; flush privileges; quit |
1 |
cat guacamole-auth-jdbc-1.1.0/mysql/schema/*.sql | mysql -u root -pP@$$w0rd guacamole_db |
Configuration de Guacamole
1 |
echo "GUACAMOLE_HOME=/etc/guacamole" >> /etc/default/tomcat8 |
Création du fichier de configuration
1 |
vi /etc/guacamole/guacamole.properties |
1 2 3 4 5 6 7 8 9 |
guacd-hostname: localhost guacd-port: 4822 auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider mysql-hostname: localhost mysql-port: 3306 mysql-database: guacamole_db mysql-username: guacamole_user mysql-password: P@$$w0rd |
1 |
ln -s /etc/guacamole /usr/share/tomcat8/.guacamole |
1 2 |
systemctl restart tomcat8.service systemctl restart guacd.service |
L’installation est terminée. Accédez à votre nouvelle application depuis l’adresse : https://votre-serveur.fr/guacamole/
Les identifiants par défaut sont : guacadmin:guacadmin
Création d’utilisateurs et bureau distant
voir doc : https://guacamole.apache.org/doc/gug/administration.html
Références
- proxy : https://blog.adminrezo.fr/2018/01/guacamole-un-proxy-web-dacces-distants/
- mysql : https://www.tutos.snatch-crash.fr/guacamole-passerelle-rdp-ssh-vnc-telnet/
- installation : https://kifarunix.com/how-to-setup-guacamole-web-based-remote-desktop-access-tool-on-ubuntu-18-04/
- officiel : https://guacamole.apache.org/doc/gug/
- certificat ssl : https://certbot.eff.org/lets-encrypt/ubuntubionic-apache