Merge pull request #377 from 21pages/selinux

format
This commit is contained in:
RustDesk 2024-04-08 16:04:28 +08:00 committed by GitHub
commit 4268b39f60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -223,12 +223,11 @@ Run `cat /etc/nginx/conf.d/rustdesk.conf` to make sure its content is correct.
#### 5. Enable firewall rules for the domain #### 5. Enable firewall rules for the domain
Run the following commands: Run the following commands:
```bash
sudo ufw allow 80/tcp `sudo ufw allow 80/tcp`
sudo ufw allow 443/tcp `sudo ufw allow 443/tcp`
sudo ufw --force enable `sudo ufw --force enable`
sudo ufw --force reload `sudo ufw --force reload`
```
#### 6. Generate SSL certificate #### 6. Generate SSL certificate
@ -302,16 +301,14 @@ Notice: Run `sudo service nginx restart` if you change the rustdesk.conf manuall
### Selinux ### Selinux
If `Waiting for RustDesk Relay service to become active...` appears when install, it may be caused by selinux. You can try the following commands: If `Waiting for RustDesk Relay service to become active...` appears when install, it may be caused by selinux. You can try the following commands:
``` `sudo semanage fcontext -a -t NetworkManager_dispatcher_exec_t 'hbbs'`
sudo semanage fcontext -a -t NetworkManager_dispatcher_exec_t 'hbbs' `sudo semanage fcontext -a -t NetworkManager_dispatcher_exec_t 'hbbr'`
sudo semanage fcontext -a -t NetworkManager_dispatcher_exec_t 'hbbr' `sudo restorecon -v '/usr/bin/hbbs'`
restorecon -v '/usr/bin/hbbs' `sudo restorecon -v '/usr/bin/hbbr'`
restorecon -v '/usr/bin/hbbr'
```
### Firewall ### Firewall
Rustdesk set fireware with `uwf`, it may not work on some distros like CentOS 9, you can try with `firewall-cmd`. Rustdesk set firewall with `ufw`, it may not work on some distros like CentOS 9, you can try with `firewall-cmd`.
`sudo firewall-cmd --permanent --add-port=21115/tcp` `sudo firewall-cmd --permanent --add-port=21115/tcp`
`sudo firewall-cmd --permanent --add-port=21116/tcp` `sudo firewall-cmd --permanent --add-port=21116/tcp`