mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-23 01:27:13 +02:00
all: do not listen on 0.0.0.0 on desktop clients
Since this may create security vulnerabilities such as DNS amplification or abusing because the listener was exposed to the entire local network.
This commit is contained in:
@@ -1042,8 +1042,10 @@ func (p *prog) queryFromSelf(ip string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// needRFC1918Listeners reports whether ctrld need to spawn listener for RFC 1918 addresses.
|
||||
// This is helpful for non-desktop platforms to receive queries from LAN clients.
|
||||
func needRFC1918Listeners(lc *ctrld.ListenerConfig) bool {
|
||||
return lc.IP == "127.0.0.1" && lc.Port == 53
|
||||
return lc.IP == "127.0.0.1" && lc.Port == 53 && !ctrld.IsDesktopPlatform()
|
||||
}
|
||||
|
||||
// ipFromARPA parses a FQDN arpa domain and return the IP address if valid.
|
||||
|
||||
Reference in New Issue
Block a user