└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # TRMM-RustDesk-Integration 2 | ### Vegetable8 3 | 4 | Getting Rustdesk integrated with [Tactical RMM](https://github.com/amidaware/tacticalrmm) is extremely simple. Thanks to the amazing work from [dinger1986](https://github.com/dinger1986) creating all scripts used here, and a simple tutorial to walk you through it all. 5 | 6 | ## Installing RustDesk Proxy Server 7 | For this, you can install the Rustdesk(RD) Proxy server on the same host you use to install TacticalRMM, or a seperate host. In this example, I will be installing it on the same host TRMM is installed on (Ubuntu 20.04 LTS). 8 | 9 | ``` 10 | sudo apt-get update 11 | ``` 12 | Create a TRMM Backup in case something does not go right. 13 | ``` 14 | wget -N https://raw.githubusercontent.com/amidaware/tacticalrmm/master/backup.sh 15 | chmod +x backup.sh 16 | ./backup.sh 17 | ``` 18 | ### Install RustDesk Server 19 | Set UFW Rules (If using UFW, if not `sudo ufw disable`) 20 | ``` 21 | ufw allow 21115:21119/tcp 22 | ufw allow 8000/tcp 23 | ufw allow 21116/udp 24 | sudo ufw enable 25 | ``` 26 | Installing Rustdesk Server 27 | ``` 28 | wget https://raw.githubusercontent.com/dinger1986/rustdeskinstall/master/install.sh 29 | chmod +x install.sh 30 | ./install.sh 31 | ``` 32 | Run through the sections of the script 33 | 34 | ![image](https://user-images.githubusercontent.com/50916823/213038323-56314f50-34dd-49b1-a217-41aaa68318f8.png) 35 | 36 | Select Option 1- or Yes 37 | 38 | ![image](https://user-images.githubusercontent.com/50916823/213042414-170185eb-2ac3-4b72-b7e9-a0dc7784e42b.png) 39 | 40 | 41 | This will make a small HTTP server, that you can go to to grab a pre-made PS1/SH script. These scripts automatically install the Rustdesk client configured to your Rustdesk proxy that you just installed 42 | 43 | - These are important scripts to download to save for a later step 44 | 45 | ### Post Rustdesk Installation 46 | If the RustDesk server is behind NAT or a firewall, ensure to forward these ports 47 | - 21115-21119 **TCP** 48 | - 21116 UDP 49 | 50 | *Personally, I would not forward port 8000 (URL To grab scripts from), as it does not seem relevant past this point to have available* 51 | 52 | ## TacticalRMM Integration 53 | 54 | #### Importing Scripts 55 | 56 | Open the .PS1 script in a text/code editor and copy all of the contents from the PS1 57 | 58 | Open TacticalRMM > Settings > Script Manager > New (Top Left) > New Script 59 | 60 | Paste the contents into the code editor, name the Script (Rustdesk- Install), ensure the "Shell Type" is Powershell and set the "Supported Platforms" to Windows. Click Save once done. 61 | 62 | Follow the same process for linuxclientinstall.sh. 63 | 64 | #### Setting up Collector Task 65 | 66 | Inside of TacticalRMM > Settings > Global Settings > Custom Fields > Add Custom Field 67 | 68 | Target: Agent
69 | Name: rustdeskid
70 | Field Type: Text 71 | Default Value: N/A 72 | 73 | Inside of TacticalRMM > Settings > Automation Manager > Click on an existing Automation Policy (Or create one now) > Tasks (Middle Region) > Add Task 74 | 75 | Name: RustDesk- Get ID
76 | Select "Collector Task"
77 | Select "Save all output"
78 | Set Alert Severity "Informational 79 | 80 | Action Type: Script
81 | Then select "Rustdesk- Install" script. Change the timeout time to 600 seconds (5 minutes) 82 | 83 | Ensure to select the + sign to add the action to the task 84 | 85 | For the schedule, run any schedule you may please. I have mine run nightly. Sometimes I will need to run manually throughout the day but this is not common. **Select "Run task ASAP after a schedule start is missed"** 86 | 87 | **9/12/23* 88 | 7 months later and I realized I never finished these docs. I'll finish it up shortly. 89 | --------------------------------------------------------------------------------