rustdesk / rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
https://rustdesk.com
GNU Affero General Public License v3.0
75.82k stars 9.9k forks source link

DNS requests from rustdesk floods my pihole #4150

Closed anojoyman closed 1 year ago

anojoyman commented 1 year ago

Bug Description

Hello, today I did setup my odroid as pihole server and after that I saw that it had rate limited my desktop pc. Upon looking in the logs I saw that it was rustdesk that was flooding with DNS requests and to only 3 domains: rs-ny.rustdesk.com rs-cn.rustdesk.com rs-sg.rustdesk.com

Pihole by default rate limits the client(my pc in this case) for 60 secs if it detects 1000 requests/60 secs. I guess domains are down but rustdesk server should timeout itself if response is not good somehow, instead of while(true) loop... Perhaps its IPv6 only problem.

Apr 21 16:21:36: query[A] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is REMOTE_IP1 Apr 21 16:21:36: query[AAAA] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is NODATA-IPv6 Apr 21 16:21:36: query[A] rs-cn.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-cn.rustdesk.com is REMOTE_IP2 Apr 21 16:21:36: query[AAAA] rs-cn.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-cn.rustdesk.com is NODATA-IPv6 Apr 21 16:21:36: query[A] rs-sg.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-sg.rustdesk.com is REMOTE_IP3 Apr 21 16:21:36: query[AAAA] rs-sg.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-sg.rustdesk.com is NODATA-IPv6 Apr 21 16:21:36: query[A] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is REMOTE_IP1 Apr 21 16:21:36: query[AAAA] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is NODATA-IPv6 Apr 21 16:21:36: query[A] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is REMOTE_IP1 Apr 21 16:21:36: query[AAAA] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is NODATA-IPv6 Apr 21 16:21:36: query[A] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is REMOTE_IP1 Apr 21 16:21:36: query[AAAA] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:36: cached rs-ny.rustdesk.com is NODATA-IPv6 Apr 21 16:21:37: query[A] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:37: cached rs-ny.rustdesk.com is REMOTE_IP1 Apr 21 16:21:37: query[AAAA] rs-ny.rustdesk.com from LOCAL_IP Apr 21 16:21:37: cached rs-ny.rustdesk.com is NODATA-IPv6 Apr 21 16:21:37: query[A] rs-sg.rustdesk.com from LOCAL_IP Apr 21 16:21:37: cached rs-sg.rustdesk.com is REMOTE_IP3 Apr 21 16:21:37: query[AAAA] rs-sg.rustdesk.com from LOCAL_IP Apr 21 16:21:37: cached rs-sg.rustdesk.com is NODATA-IPv6

How to Reproduce

I guess just setup pihole and look its logs

Expected Behavior

Rustdesk should not query endlessly those domains even if they are down - some form of timeout extending each bad response I guess.

Operating system(s) on local side and remote side

ArchLinux

RustDesk Version(s) on local side and remote side

1.1.9

Screenshots

No need for screenshots.

Additional Context

No response

rustdesk commented 1 year ago

It is not while (True) at least in master branch.

https://github.com/rustdesk/rustdesk/blob/ae6d80cebe21bd317196852ed84ed6299ac93c56/src/rendezvous_mediator.rs#L100

anojoyman commented 1 year ago

It was bad joke attempt :) Edit: And clicked "Close" by mistake...