Guacamole – Giải pháp remoting
Apache Guacamole là một giải pháp remoting (remote access) web-based, cho phép người dùng truy cập máy tính từ xa thông qua trình duyệt web mà không cần cài đặt thêm phần mềm hoặc ứng dụng client. Nó được phát triển như một dự án mã nguồn mở thuộc Apache Software Foundation.
Một số đặc điểm và tính năng chính của Apache Guacamole:
- Truy cập từ xa đa giao thức:
- Hỗ trợ các giao thức remote desktop như RDP (Remote Desktop Protocol), SSH, Telnet và VNC.
- Cho phép người dùng truy cập và điều khiển máy tính từ xa thông qua các giao thức này.
- Giao diện web-based:
- Cung cấp một giao diện web hoàn toàn, không cần cài đặt hoặc tải xuống bất kỳ ứng dụng client nào.
- Người dùng có thể truy cập và điều khiển máy tính từ xa thông qua trình duyệt web.
- Tính linh hoạt và mở rộng:
- Được thiết kế với kiến trúc modular, cho phép dễ dàng tích hợp và mở rộng với các tính năng mới.
- Có thể tích hợp với các hệ thống xác thực như LDAP, SAML, Active Directory, v.v.
- Bảo mật và quyền truy cập:
- Hỗ trợ xác thực người dùng và phân quyền truy cập.
- Cung cấp các tính năng bảo mật như SSL/TLS encryption, two-factor authentication, v.v.
- Khả năng mở rộng:
- Có thể triển khai trên các nền tảng khác nhau như Windows, Linux, macOS.
- Có thể mở rộng để phục vụ nhiều người dùng cùng lúc.
Apache Guacamole được sử dụng rộng rãi trong các môi trường IT, chẳng hạn như trong các trung tâm dữ liệu, văn phòng từ xa, lớp học ảo, v.v. vì nó cung cấp một giải pháp remoting an toàn và dễ sử dụng.
II. Cài đặt Guacamole bằng Docker
Guacamole gồm có hai phần: Guacamole Server và Guacamole Client. Cách cài đặt thông thường được hướng dẫn chi tiết ở đây. Tốt nhất bạn không nên xem vì nó cực kỳ rắc rối và khó hiểu.
Để đơn giản hoá, mình sẽ cài đặt Guacamole thông qua Docker, sử dụng nguồn guacamole-docker-compose. Chỉ mất vài phút là sẽ có hệ thống Guacamole sẵn sàng phục vụ.
Yêu cầu bạn phải cài đặt sẵn Docker và Docker Compose trước khi tiếp tục với các thao tác bên dưới.
1. Tải mã nguồn
Kết nối vào máy ảo Ubuntu / Debian của bạn và tải mã nguồn về máy
<span class="hljs-built_in">cd</span> ~
git <span class="hljs-built_in">clone</span> <span class="hljs-string">"https://github.com/boschkundendienst/guacamole-docker-compose.git"</span>
Code language: Bash (bash)
Nếu bi báo lỗi git: command not found
, bạn cần cài đặt thêm git
vào máy bằng lệnh dưới đây, sau đó thực hiện lại.
<span class="hljs-attribute">sudo</span> apt install git
Code language: Nginx (nginx)
2. Chuẩn bị hệ thống
Truy cập vào thư mục guacamole-docker-compose
và chạy script prepare.sh
để hệ thống khởi tạo các file cấu hình cần thiết.
<span class="hljs-built_in">cd</span> guacamole-docker-compose
./prepare.sh
Code language: Bash (bash)
Kết quả hiện ra sau 1-2 giây
Preparing folder init <span class="hljs-keyword">and</span> creating ./init/initdb.sql
done
Creating SSL certificates
Generating a RSA <span class="hljs-keyword">private</span> key
.........+++++
..................+++++
writing <span class="hljs-keyword">new</span> <span class="hljs-keyword">private</span> key to <span class="hljs-string">'nginx/ssl/self-ssl.key'</span>
-----
You can <span class="hljs-keyword">use</span> <span class="hljs-title">your</span> <span class="hljs-title">own</span> <span class="hljs-title">certificates</span> <span class="hljs-title">by</span> <span class="hljs-title">placing</span> <span class="hljs-title">the</span> <span class="hljs-title">private</span> <span class="hljs-title">key</span> <span class="hljs-title">in</span> <span class="hljs-title">nginx</span>/<span class="hljs-title">ssl</span>/<span class="hljs-title">self</span>-<span class="hljs-title">ssl</span>.<span class="hljs-title">key</span> <span class="hljs-title">and</span> <span class="hljs-title">the</span> <span class="hljs-title">cert</span> <span class="hljs-title">in</span> <span class="hljs-title">nginx</span>/<span class="hljs-title">ssl</span>/<span class="hljs-title">self</span>.<span class="hljs-title">cert</span>
<span class="hljs-title">done</span>
Code language: PHP (php)
3. Chỉnh sửa docker-compose.yml
Dưới đây là nội dung mặc định của file docker-compose.yml
<span class="hljs-comment">####################################################################################</span>
<span class="hljs-comment"># docker-compose file for Apache Guacamole</span>
<span class="hljs-comment"># created by PCFreak 2017-06-28</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Apache Guacamole is a clientless remote desktop gateway. It supports standard</span>
<span class="hljs-comment"># protocols like VNC, RDP, and SSH. We call it clientless because no plugins or</span>
<span class="hljs-comment"># client software are required. Thanks to HTML5, once Guacamole is installed on</span>
<span class="hljs-comment"># a server, all you need to access your desktops is a web browser.</span>
<span class="hljs-comment">####################################################################################</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># What does this file do?</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Using docker-compose it will:</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># - create a network 'guacnetwork_compose' with the 'bridge' driver.</span>
<span class="hljs-comment"># - create a service 'guacd_compose' from 'guacamole/guacd' connected to 'guacnetwork'</span>
<span class="hljs-comment"># - create a service 'postgres_guacamole_compose' (1) from 'postgres' connected to 'guacnetwork'</span>
<span class="hljs-comment"># - create a service 'guacamole_compose' (2) from 'guacamole/guacamole/' conn. to 'guacnetwork'</span>
<span class="hljs-comment"># - create a service 'nginx_guacamole_compose' (3) from 'nginx' connected to 'guacnetwork'</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># (1)</span>
<span class="hljs-comment"># DB-Init script is in './init/initdb.sql' it has been created executing</span>
<span class="hljs-comment"># 'docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > ./init/initdb.sql'</span>
<span class="hljs-comment"># once.</span>
<span class="hljs-comment"># DATA-DIR is in './data'</span>
<span class="hljs-comment"># If you want to change the DB password change all lines with 'POSTGRES_PASSWORD:' and</span>
<span class="hljs-comment"># change it to your needs before first start.</span>
<span class="hljs-comment"># To start from scratch delete './data' dir completely</span>
<span class="hljs-comment"># './data' will hold all data after first start!</span>
<span class="hljs-comment"># The initdb.d scripts are only executed the first time the container is started</span>
<span class="hljs-comment"># (and the database files are empty). If the database files already exist then the initdb.d</span>
<span class="hljs-comment"># scripts are ignored (e.g. when you mount a local directory or when docker-compose saves</span>
<span class="hljs-comment"># the volume and reuses it for the new container).</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># !!!!! MAKE SURE your folder './init' is executable (chmod +x ./init)</span>
<span class="hljs-comment"># !!!!! or 'initdb.sql' will be ignored!</span>
<span class="hljs-comment"># </span>
<span class="hljs-comment"># './data' will hold all data after first start!</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># (2)</span>
<span class="hljs-comment"># Make sure you use the same value for 'POSTGRES_USER' and 'POSTGRES_PASSWORD'</span>
<span class="hljs-comment"># as configured under (1)</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># (3)</span>
<span class="hljs-comment"># ./nginx/nginx.conf will be mapped read-only into the container at /etc/nginx/nginx.conf</span>
<span class="hljs-comment"># ./nginx/mysite.template will be mapped into the container at /etc/nginx/conf.d/mysite.template</span>
<span class="hljs-comment"># ./nginx/ssl will be mapped into the container at /etc/nginx/ssl</span>
<span class="hljs-comment"># At startup a self-signed certificate will be created. If you want to use your own certs</span>
<span class="hljs-comment"># just remove the part that generates the certs from the 'command' section and replace</span>
<span class="hljs-comment"># 'self-ssl.key' and 'self.cert' with your certificate.</span>
<span class="hljs-comment"># To debug nginx replace '&& nginx -g 'daemon off' with '&& nginx-debug -g 'daemon off'</span>
<span class="hljs-comment"># nginx will export port 8443 to the outside world, make sure that this port is reachable</span>
<span class="hljs-comment"># on your system from the "outside world". All other traffice is only internal.</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># You could remove the entire 'nginx' service from this file if you want to use your own</span>
<span class="hljs-comment"># reverse proxy in front of guacamole. If doing so, make sure you change the line</span>
<span class="hljs-comment"># - 8080/tcp</span>
<span class="hljs-comment"># to - 8080:8080/tcp</span>
<span class="hljs-comment"># within the 'guacamole' service. This will expose the guacamole webinterface directly</span>
<span class="hljs-comment"># on port 8080 and you can use it for your own purposes.</span>
<span class="hljs-comment"># Do note, guacamole is available on :8080/guacamole, not /.</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># !!!!! FOR INITAL SETUP (after git clone) run ./prepare.sh once</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># !!!!! FOR A FULL RESET (WILL ERASE YOUR DATABASE, YOUR FILES, YOUR RECORDS AND CERTS) DO A</span>
<span class="hljs-comment"># !!!!! ./reset.sh</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># The initial login to the guacamole webinterface is:</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Username: guacadmin</span>
<span class="hljs-comment"># Password: guacadmin</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Make sure you change it immediately!</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># version date comment</span>
<span class="hljs-comment"># 0.1 2017-06-28 initial release</span>
<span class="hljs-comment"># 0.2 2017-10-09 minor fixes + internal GIT push</span>
<span class="hljs-comment"># 0.3 2017-10-09 minor fixes + public GIT push</span>
<span class="hljs-comment"># 0.4 2019-08-14 creating of ssl certs now in prepare.sh</span>
<span class="hljs-comment"># simplified nginx startup commands</span>
<span class="hljs-comment">####################################################################################</span>
<span class="hljs-attr">version:</span> <span class="hljs-string">'2.0'</span>
<span class="hljs-comment"># networks</span>
<span class="hljs-comment"># create a network 'guacnetwork_compose' in mode 'bridged'</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">driver:</span> <span class="hljs-string">bridge</span>
<span class="hljs-comment"># services</span>
<span class="hljs-attr">services:</span>
<span class="hljs-comment"># guacd</span>
<span class="hljs-attr">guacd:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">guacd_compose</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">guacamole/guacd</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
<span class="hljs-attr">volumes:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./drive:/drive:rw</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./record:/record:rw</span>
<span class="hljs-comment"># postgres</span>
<span class="hljs-attr">postgres:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">postgres_guacamole_compose</span>
<span class="hljs-attr">environment:</span>
<span class="hljs-attr">PGDATA:</span> <span class="hljs-string">/var/lib/postgresql/data/guacamole</span>
<span class="hljs-attr">POSTGRES_DB:</span> <span class="hljs-string">guacamole_db</span>
<span class="hljs-attr">POSTGRES_PASSWORD:</span> <span class="hljs-string">'ChooseYourOwnPasswordHere1234'</span>
<span class="hljs-attr">POSTGRES_USER:</span> <span class="hljs-string">guacamole_user</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">postgres:13.4</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
<span class="hljs-attr">volumes:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./init:/docker-entrypoint-initdb.d:ro</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./data:/var/lib/postgresql/data:rw</span>
<span class="hljs-comment"># guacamole</span>
<span class="hljs-attr">guacamole:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">guacamole_compose</span>
<span class="hljs-attr">depends_on:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">guacd</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">postgres</span>
<span class="hljs-attr">environment:</span>
<span class="hljs-attr">GUACD_HOSTNAME:</span> <span class="hljs-string">guacd</span>
<span class="hljs-attr">POSTGRES_DATABASE:</span> <span class="hljs-string">guacamole_db</span>
<span class="hljs-attr">POSTGRES_HOSTNAME:</span> <span class="hljs-string">postgres</span>
<span class="hljs-attr">POSTGRES_PASSWORD:</span> <span class="hljs-string">'ChooseYourOwnPasswordHere1234'</span>
<span class="hljs-attr">POSTGRES_USER:</span> <span class="hljs-string">guacamole_user</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">guacamole/guacamole</span>
<span class="hljs-attr">links:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">guacd</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">ports:</span>
<span class="hljs-comment">## enable next line if not using nginx</span>
<span class="hljs-comment">## - 8080:8080/tcp # Guacamole is on :8080/guacamole, not /.</span>
<span class="hljs-comment">## enable next line when using nginx</span>
<span class="hljs-bullet">-</span> <span class="hljs-number">8080</span><span class="hljs-string">/tcp</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
<span class="hljs-comment">########### optional ##############</span>
<span class="hljs-comment"># nginx</span>
<span class="hljs-attr">nginx:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">nginx_guacamole_compose</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">nginx</span>
<span class="hljs-attr">volumes:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./nginx/ssl/self.cert:/etc/nginx/ssl/self.cert:ro</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./nginx/ssl/self-ssl.key:/etc/nginx/ssl/self-ssl.key:ro</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./nginx/nginx.conf:/etc/nginx/nginx.conf:ro</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./nginx/mysite.template:/etc/nginx/conf.d/default.conf:ro</span>
<span class="hljs-attr">ports:</span>
<span class="hljs-bullet">-</span> <span class="hljs-number">8443</span><span class="hljs-string">:443</span>
<span class="hljs-attr">links:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">guacamole</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-comment"># run nginx</span>
<span class="hljs-attr">command:</span> <span class="hljs-string">/bin/bash</span> <span class="hljs-string">-c</span> <span class="hljs-string">"nginx -g 'daemon off;'"</span>
<span class="hljs-comment"># nginx-debug-mode</span>
<span class="hljs-comment"># command: /bin/bash -c "nginx-debug -g 'daemon off;'"</span>
<span class="hljs-comment">####################################################################################</span>
Code language: YAML (yaml)
Tổng cộng sẽ có 4 dịch vụ được kích hoạt, mỗi em đảm nhận 1 nhiệm vụ:
- guacd: Guacamole Server
- guacamole: Guacamole Client
- postgres: PostgresSQL Database
- Nginx: Reverse Proxy (không bắt buộc)
Mình đã có sẵn Nginx Proxy Manager làm Reverse Proxy, không cần thêm cái Nginx trong file này nữa nên sẽ xoá toàn bộ thông số của phần nginx ở cuối. Bên cạnh đó, cần phải sửa lại dòng 139 (bỏ #) và dòng 141 (thêm #)
Đồng thời xoá luôn phần thông tin ở phần đầu cho gọn.
File docker-compose.yml
được rút lại như dưới đây
<span class="hljs-attr">version:</span> <span class="hljs-string">'2.0'</span>
<span class="hljs-comment"># networks</span>
<span class="hljs-comment"># create a network 'guacnetwork_compose' in mode 'bridged'</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">driver:</span> <span class="hljs-string">bridge</span>
<span class="hljs-comment"># services</span>
<span class="hljs-attr">services:</span>
<span class="hljs-comment"># guacd</span>
<span class="hljs-attr">guacd:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">guacd_compose</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">guacamole/guacd</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
<span class="hljs-attr">volumes:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./drive:/drive:rw</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./record:/record:rw</span>
<span class="hljs-comment"># postgres</span>
<span class="hljs-attr">postgres:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">postgres_guacamole_compose</span>
<span class="hljs-attr">environment:</span>
<span class="hljs-attr">PGDATA:</span> <span class="hljs-string">/var/lib/postgresql/data/guacamole</span>
<span class="hljs-attr">POSTGRES_DB:</span> <span class="hljs-string">guacamole_db</span>
<span class="hljs-attr">POSTGRES_PASSWORD:</span> <span class="hljs-string">'ChooseYourOwnPasswordHere1234'</span>
<span class="hljs-attr">POSTGRES_USER:</span> <span class="hljs-string">guacamole_user</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">postgres:13.4</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
<span class="hljs-attr">volumes:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./init:/docker-entrypoint-initdb.d:ro</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">./data:/var/lib/postgresql/data:rw</span>
<span class="hljs-comment"># guacamole</span>
<span class="hljs-attr">guacamole:</span>
<span class="hljs-attr">container_name:</span> <span class="hljs-string">guacamole_compose</span>
<span class="hljs-attr">depends_on:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">guacd</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">postgres</span>
<span class="hljs-attr">environment:</span>
<span class="hljs-attr">GUACD_HOSTNAME:</span> <span class="hljs-string">guacd</span>
<span class="hljs-attr">POSTGRES_DATABASE:</span> <span class="hljs-string">guacamole_db</span>
<span class="hljs-attr">POSTGRES_HOSTNAME:</span> <span class="hljs-string">postgres</span>
<span class="hljs-attr">POSTGRES_PASSWORD:</span> <span class="hljs-string">'ChooseYourOwnPasswordHere1234'</span>
<span class="hljs-attr">POSTGRES_USER:</span> <span class="hljs-string">guacamole_user</span>
<span class="hljs-attr">image:</span> <span class="hljs-string">guacamole/guacamole</span>
<span class="hljs-attr">links:</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">guacd</span>
<span class="hljs-attr">networks:</span>
<span class="hljs-attr">guacnetwork_compose:</span>
<span class="hljs-attr">ports:</span>
<span class="hljs-comment">## enable next line if not using nginx</span>
<span class="hljs-bullet">-</span> <span class="hljs-number">8080</span><span class="hljs-string">:8080/tcp</span> <span class="hljs-comment"># Guacamole is on :8080/guacamole, not /.</span>
<span class="hljs-comment">## enable next line when using nginx</span>
<span class="hljs-comment">## - 8080/tcp</span>
<span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
Code language: YAML (yaml)
4. Kích hoạt Guacamole
docker-compose up -d
Mở trình duyệt web truy cập vào địa chỉ sau (chú ý phải có /guacamole
ở cuối).
http:<span class="hljs-comment">//<IP-của-Server>:8080/guacamole</span>
Code language: JavaScript (javascript)
Nếu suôn sẻ, bạn sẽ nhìn thấy trang đăng nhập của Guacamole như dưới đây

Đăng nhập bằng tài khoản mặc định
- Username: guacadmin
- Password: guacadmin
Giao diện mặc định của Guacamole hiện ra nào
III. Cấu hình Guacamole
1. Thay đổi mật khẩu
Để tăng bảo mật, việc đầu tiên bạn cần làm là thay đổi mật khẩu của tài khoản mặc định guacadmin
.
Bấm vào tên tài khoản ở góc trên bên phải, chọn Settings
Sau đó chuyển qua tab Preferences và cập nhật mật khẩu mới cho tài khoản mặc định guacadmin trong phần Change Password. Bấm Update Password để xác nhận thay đổi.

Ngoài ra bạn cũng có thể truy cập vào tab Users để tạo tài khoản mới, sau đó xoá tài khoản mặc định guacadmin
khỏi hệ thống.
2. Tạo kết nối RDP
Tiếp theo, truy cập vào tab Connections để bắt đầu thiết lập các kết nối đến máy tính cần truy cập. Bấm nút New Connection để tạo kết nối mới.
Đầu tiên, mình sẽ tạo kết nối Remote Desktop đến máy tính chạy Windows thông qua giao thức RDP.
- Name: Đặt tên kết nối theo ý của bạn
- Protocol: chọn RDP
Kéo xuống mục Parameters và nhập tiếp các thông tin sau
- Hostname: địa chỉ IP hoặc tên hostname của máy tính cần điều khiển
- Port: 3389 (đây là port mặc định của RDP. Nếu bạn đã thay đổi cổng kết nối RDP của máy tính, cần phải nhập đúng port đó ở đây)
- Username / Password: nhập tên tài khoản và mật khẩu đăng nhập máy tính
- Domain: để trống nếu bạn đăng nhập máy tính bằng tài khoản email Microsoft hoặc điền vào WORKGROUP nếu bạn đăng nhập bằng tài khoản offline.
- Security Mode: chọn Any
- Ignore server certificate: bấm chọn để ẩn cảnh báo SSL, đỡ vướng mắt.
Sau đó bấm xuống dưới cùng bấm Save để lưu lại.
3. Tạo kết nối SSH
Tương tự như trên, nhưng mục Protocol sẽ chọn SSH và thông số Parameters sẽ hơi khác
- Hostname: địa chỉ IP hay tên miền của máy chủ
- Port: 22
- Username / Password: tài khoản và mật khẩu đăng nhập máy chủ
- Private key: nếu bạn đã thiết lập kết nối SSH thông qua Private Key, điền nó vào mục này.
Bấm Save để lưu lại.
4. Tạo kết nối VNC
Thao tác y hệt như 2 phần trước, chỉ thay đổi vài chỗ
- Protocol: VNC
- Port: 5900

IV. Sử dụng Guacamole
Để truy cập vào máy chủ, bấm vào kết nối tương ứng. Ví dụ như mình truy cập vào VPS thông qua SSH, Guacamole sẽ tự động kết nối và đăng nhập vào VPS dựa theo thông tin đã cấu hình trước đó

Để thoát khỏi máy chủ và quay về trang quản lý của Guacamole, mình gõ lệnh exit, sau đó chọn Home
Trong trường hợp kết nối vào máy tính có giao diện desktop, ví dụ Windows 10, bạn sẽ thao tác trực tiếp trên trình duyệt như đang ngồi trước máy tính.
Nếu muốn chỉnh thiết lập của Guacamole khi đang kết nối với máy chủ, hãy bấm tổ hợp phím Ctrl – Alt – Shift để truy cập Menu. Bấm tổ hợp này thêm 1 lần nữa để tắt đi
V. Tạo Reverse Proxy cho Guacamole
Mình muốn truy cập Guacamole thông qua tên miền, kết hợp thêm chứng chỉ SSL nên sẽ sử dụng Nginx Proxy Manager để tạo Reverse Proxy cho nó.
Tạo Proxy Host mới và nhập vào các thông tin cần thiết
- Domain Name: tên miền để truy cập vào Guacamole
- Scheme: http
- Forward Hostname / IP: Địa chỉ IP của máy chủ đang cài Guacamole
- Forward Port: 8088

Chọn qua tab Custom locations, tạo location mới
- location:
/
- Scheme: http
- Forward Hostname / IP:
192.168.0.50/guacamole/
(chú ý phải ghi đầy đủ/guacamole/
sau địa chỉ IP - Forawrd Port: 8088

Bấm tiếp qua mục SSL để yêu cầu tạo chứng chỉ SSL mới

Bấm Save để lưu lại.
Nếu thực hiện chính xác, bạn đã có thể truy cập Guacamole thông qua tên miền đã thiết lập ở trên.
Hướng dẫn cài đặt và sử dụng Apache Guacamole đến đây là hết. Chúc bạn thực hiện thành công!
Hẹn gặp lại các bạn tại các bài viết sau tại wilki.nhanhoa.com