Will the DNS server reply to the spoofed address if you send a DNS request on behalf of it?
What I'm trying to ask isn't DNS spoofing but spoofing the source address.
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
It depends on what underlying protocol is in use.
As a general rule of thumb, network protocols that establish connections or use handshakes are immune to source address spoofing. This is because if the source address is spoofed then a connection will never be successfully made (since the spoofed destination won't know how to respond), no connection will be established, and nothing more than an initial handshake packet will be sent. For some examples:
"Standard" DNS can use TCP/IP (h/t Patrick) or UDP. Typically it defaults to UDP, which is connection-less and therefore vulnerable to source-address spoofing. This means that if you send a spoofed UDP packet to a DNS server with a forged address, the DNS server should send the response to the spoofed source address, not you.
However, there are newer DNS "versions" rolling out that use different underlying protocols. For instance DoH (DNS over HTTPS) uses HTTPS itself, which is built on top of TCP/IP. Therefore you would not be able to spoof a source address to a DNS server using DoH, for the same reason why you can't spoof a source address for an HTTP server. Similarly, whether or not the other new variants of DNS are vulnerable to such attacks depends on the underlying protocol used.