-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nmap on Windows: use appropriate DNS servers for the target address #1349
Comments
It seems like I have encountered a similar problem. My problem in short:There are some DNS-Servers configured on an inactive interface (208.67.220.220 and My System:Windows 10 .0.17134.165 64Bit Nmap output:When I run "nmap 192.168.2.2 -sn -R -dd" I get this (line numbers added by me): [... output 1]
[... end of output 1] My problem in detail:
Further notes:When I run nmap 192.168.2.2 -sn -R -dd --system-dns, [... start of output 2]
[... end of output 2] This is odd, specialy compared to the output of, the also successful, [... start of output 3]
[... end of output 3] Also is there a way to get a more verbose debug output? -v3, -v4, -d3, -d4, -d5, or -d6 like used here https://nmap.org/book/nping-man-output-options.html seem to make no difference at all. |
While investigating #1328, I realized that Nmap may be choosing the "wrong" DNS servers in some cases. Imagine a Windows system connected to several different networks: maybe a VPN, WiFi, and a wired network. The user scans a target on the WiFi network, and Nmap tries to do reverse-DNS lookup of the address. But it retrieves the list of DNS servers from all configured network interfaces and distributes PTR requests across them all. The request may very well go to the VPN's DNS server or the wired Ethernet connection's server.
I propose trying to identify the interface for the target (I think we already track this internally) and using the appropriate servers for that interface, unless
--dns-servers
is specified.The text was updated successfully, but these errors were encountered: