Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| computers:guacamole [2025/02/23 20:34] – jon | computers:guacamole [2025/03/14 19:45] (current) – jon | ||
|---|---|---|---|
| Line 40: | Line 40: | ||
| Proxy Steps: | Proxy Steps: | ||
| https:// | https:// | ||
| + | |||
| + | ===== Hardening the Tomcat instance ===== | ||
| + | |||
| + | Sourced from - https:// | ||
| + | |||
| + | ==== Redirect the root index ==== | ||
| + | |||
| + | Rename index.html to index.html.backup | ||
| + | |||
| + | vim index.jsp | ||
| + | |||
| + | Add this line: | ||
| + | |||
| + | < | ||
| + | |||
| + | Now, this doesn' | ||
| + | |||
| + | ==== Hiding the server details/ | ||
| + | |||
| + | Make a page on the root level of the application directory named error.jsp | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Then in your global config under web.xml add these lines to the bottom of the config before the </ | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Restart tomcat for this to take effect. | ||
| ===== Exporting the config ===== | ===== Exporting the config ===== | ||
| - | ChatGPT did help with this.. but it has worked for me shifting over from a Pi to a VM. | + | ChatGPT did help with this.. but it has worked for me shifting over from a Pi to a VM. This is based on the MysticRyuujin installer which is getting long in the tooth, but is still reliable up to Debian 11. |
| Apache Guacamole Migration Plan (Debian, MySQL-Based Setup) | Apache Guacamole Migration Plan (Debian, MySQL-Based Setup) | ||
| Line 62: | Line 110: | ||
| Copy the dump file to the new server: | Copy the dump file to the new server: | ||
| - | bash | + | < |
| - | Copy | + | |
| - | Edit | + | |
| - | scp guacamole_backup.sql youruser@newserver:/ | + | |
| Step 2: Backup Configuration Files | Step 2: Backup Configuration Files | ||
| Copy essential Guacamole configuration files: | Copy essential Guacamole configuration files: | ||
| - | bash | + | < |
| - | Copy | + | scp guac_config_backup.tar.gz youruser@newserver:/ |
| - | Edit | + | |
| - | tar -czvf guac_config_backup.tar.gz / | + | |
| - | scp guac_config_backup.tar.gz youruser@newserver:/ | + | |
| Step 3: Install Guacamole on the New Server | Step 3: Install Guacamole on the New Server | ||
| Run the installer on the new server: | Run the installer on the new server: | ||
| - | bash | + | |
| - | Copy | + | < |
| - | Edit | + | |
| - | git clone https:// | + | |
| cd guac-install | cd guac-install | ||
| - | sudo ./ | + | sudo ./ |
| - | Don’t log in yet—restore | + | |
| + | Don’t log in yet. Restore | ||
| Step 4: Restore the Database | Step 4: Restore the Database | ||
| On the new server: | On the new server: | ||
| Line 88: | Line 132: | ||
| Temporarily grant full privileges to guacamole_user: | Temporarily grant full privileges to guacamole_user: | ||
| - | bash | + | < |
| - | Copy | + | |
| - | Edit | + | |
| - | sudo mysql -u root -p | + | |
| Inside MySQL, run: | Inside MySQL, run: | ||
| - | sql | + | < |
| - | Copy | + | |
| - | Edit | + | |
| - | GRANT ALL PRIVILEGES ON guacamole_db.* TO ' | + | |
| FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
| - | EXIT; | + | EXIT;</ |
| Import the database dump: | Import the database dump: | ||
| - | bash | + | < |
| - | Copy | + | |
| - | Edit | + | |
| - | mysql -u guacamole_user -p guacamole_db < guacamole_backup.sql | + | |
| Revert guacamole_user permissions to limit access: | Revert guacamole_user permissions to limit access: | ||
| - | bash | + | < |
| - | Copy | + | |
| - | Edit | + | |
| - | sudo mysql -u root -p | + | |
| Run: | Run: | ||
| - | sql | + | < |
| - | Copy | + | |
| - | Edit | + | |
| - | REVOKE ALL PRIVILEGES ON guacamole_db.* FROM ' | + | |
| GRANT SELECT, INSERT, UPDATE, DELETE ON guacamole_db.* TO ' | GRANT SELECT, INSERT, UPDATE, DELETE ON guacamole_db.* TO ' | ||
| FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
| - | EXIT; | + | EXIT;</ |
| Step 5: Restore Configuration Files | Step 5: Restore Configuration Files | ||
| Extract and move the config backup: | Extract and move the config backup: | ||
| - | bash | + | < |
| - | Copy | + | sudo systemctl daemon-reload</ |
| - | Edit | + | |
| - | sudo tar -xzvf guac_config_backup.tar.gz -C / | + | |
| - | sudo systemctl daemon-reload | + | |
| Step 6: Restart Services and Verify | Step 6: Restart Services and Verify | ||
| Restart Guacamole services: | Restart Guacamole services: | ||
| - | bash | + | < |
| - | Copy | + | sudo systemctl restart tomcat9</ |
| - | Edit | + | |
| - | sudo systemctl restart guacd | + | Then, log in via the web interface—all users, connections, |
| - | sudo systemctl restart tomcat9 | + | |
| - | Then, log in via the web interface—all users, connections, | + | |