Home > Blockchain >  How can I see what DNS requests are being made by a website?
How can I see what DNS requests are being made by a website?

Time:02-17

I recently generated a unified hosts file from Steven Black's hosts github project on my MX Linux machine. However, it's preventing cbs.com from loading their sponsored messages. This, in turn, is preventing the actual content from loading. I need to whitelist the domain for their ads, or at least remove it from my hosts file.

I am wondering if there is a way to see/monitor what DNS requests are made by a website that I'm visiting. I simply need to figure out what server CBS is reaching out to for their ads, so that I can ensure they're able to.

CodePudding user response:

Found a great way to do this by using dnstop. It can be installed with:

sudo apt-get install dnstop

Then you need the network interface name for the device you want to listen to. You can see a list of these interfaces with this command:

ip link show

The name following the listing number is what you need. This will be something like "eth0" or "wlan0". Once you know the interface name, run this command:

dnstop {interface-name}

With the interface you want to listen to. Once dnstop starts, press the number 2 on your keyboard to view a list and running tally of requests made.

CodePudding user response:

you can use wireshark for this. Wireshark might be overkill but it does the work.

  • Related