Inspecting the DNS client and server communication

Throughout this book we've captured network packets between the client and the server using Wireshark. Here, we look at an example of session capturing while Python is executing the script where we obtain DNS details from a domain.

In Wireshark, you can specify port 53 by navigating to Capture | Options | Capture filter. This will capture all the DNS packets that were sent to/from your machine. We can also filter with the dns keyword.

In the following screenshot, we can see how the client and the server have several request/response cycles with the DNS records. It was started with a standard request for the host's address and it was followed by a suitable response:

If you look deep inside the packet, you can see the request format of the response from the server:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset