Friday

Apache Guacamole installation in Docker Container-- Browser based RDP and SSH

 

Step by  Step Installation and configuration  Apache Guacamole as Docker Container

Apache Guacamole is a clientless remote desktop gateway and browser  based SSH. It supports standard protocols like VNC, RDP, and SSH. This guide will walk you through the installation and configuration of Apache Guacamole using Docker containers on a Linux machine.

Prerequisites


  • A Linux machine with the server IP: 192.168.10.10
  • OS Ubuntu, Redhat, Centos, Rocky Linux
  • Basic knowledge of Docker and Linux command line

  • Step 1: Install Docker Engine

    Ubuntu:
    Update the package index and install packages to allow apt to use a repository over HTTPS
    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

    Add Docker’s official GPG key:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

    Add the Docker repository
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    Update the package index again and install Docker:
    sudo apt update
    sudo apt install docker.io -y



    Red Hat, CentOS, and Rocky Linux
    Install required packages:
    sudo yum install -y yum-utils

    Add Docker’s official repository:
    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

    Install Docker:

    sudo yum install docker-ce docker-ce-cli containerd.io

    Start and enable Docker:

    sudo systemctl start docker
    sudo systemctl enable docker


    Step 2: Download Apache Guacamole Server and Client Docker Images

    Next, you need to download the necessary Docker images for Apache Guacamole and its dependencies:

    docker pull guacamole/guacamole
    docker pull guacamole/guacd
    docker pull mariadb

    To verify the downloaded images, you can list them using:
    docker images

    Step 3: Run MariaDB Container

    docker run -d --name mariadb \

       -p 3306:3306 \

      -e MYSQL_ROOT_PASSWORD=Mysql#135 \

      -e MYSQL_DATABASE=guacamole \

      -e MYSQL_USER=guacamole \

      -e MYSQL_PASSWORD=guacamole \

      mariadb:latest

    Note: Replace <mysql root password> with a secure password of your choice.

    Step 4: Initialize Guacamole Database

    Initialize the Guacamole database schema by running the following command:

    docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > /root/guacamole-initdb.sql


    Then, import the generated SQL script into the MariaDB container:
    docker exec -i mariadb mysql -u root -p<mysql root password> guacamole < /root/guacamole-initdb.sql

    Step 5: Run Guacamole and Guacd Containers

    First, run the guacd container which is the Guacamole proxy daemon:

    docker run --name guacd -d -p 4822:4822 guacamole/guacd

    Then, run the guacamole container:

    docker run --name guacamole \ -e GUACD_HOSTNAME=192.168.10.10 \ -e GUACD_PORT=4822 \ -e MYSQL_HOSTNAME=192.168.10.10 \ -e MYSQL_PORT=3306 \ -e MYSQL_DATABASE=guacamole \ -e MYSQL_USER=guacamole \ -e MYSQL_PASSWORD=guacamole \ -e MYSQL_AUTO_CREATE_ACCOUNTS=true \ -e LOGBACK_LEVEL=info \ -d -p 8081:8080 guacamole/guacamole

    To verify the running containers you can list them using:

    docker ps



    Step 6: Access Guacamole

    Once all containers are up and running, you can access the Guacamole web interface by navigating to:

    http://192.168.10.10:8081/guacamole

    Log in using the default credentials:

    • Username: guacadmin
    • Password: guacadmin



    Conclusion

    You have successfully installed and configured Apache Guacamole using Docker containers on your Linux server. You can now configure and manage remote desktop connections through the Guacamole web interface. Don't forget to change the default password for security reasons


    Unlocking the Power of Outcome-Driven Metrics in Cybersecurity

      Unlocking the Power of Outcome-Driven Metrics in Cybersecurity In the fast-evolving world of cybersecurity, staying ahead of threats requi...