1

Following this setup http://www.g-loaded.eu/2010/09/18/caching-nameserver-using-dnsmasq/ I was able to configure a DNS resolver server using dnsmasq for my network. The setup works correctly and logs DNS name resolution.

I would like to make this setup also log Full-URL information, we don't want to intercept any data but only log what URL a user is accessing - using a DNS server to achieve this is the preferred solution.

iTech
  • 355
  • 4
  • 15

2 Answers2

3

Sadly you can not log what you do not have. The DNS is never asked for the URL. The DNS is only asked to resolve the host name to an IP. The DNS protocol does not deal with anything else.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • But we can have something which can log the detail and redirect the user to their destination. I guess something like logging-proxy? – iTech Sep 16 '14 at 10:28
  • No you can't. DNS requests/responses only contain IP/domain. No other informations (beside dsn specific ones) are transmitted. – Pierre-Yves Gillier Sep 16 '14 at 10:35
  • Yes. See, someone wants a URL in the browser. Browser asks OS for the IP address for the host. OS asks DNS. Once browser gets answer, it asks host for the URL. Neither the OS nor the DNS get the URL in this part - only the hostname. Reality does not care what iTech wants in this case, DNS was desigend to do only one thing, regardless how convenient it would be for you if it were designed differently. – TomTom Sep 16 '14 at 12:11
0

If you need to log this, then I would say what you really need (although you may come to regret it...) is a [possibly transparent] proxy or a firewall that does Deep Packet Inspection (DPI) [which goes by various other names too], such as the FortiNet devices.

Neither of these will tell you about what goes happens inside a https connection (though it will tell you which IP/DNS they connected to), although if you cause all the devices to trust a local CA certificate that you create (and use to dynamically sign everything; your users will hate you for that, by the way), then you could look in all/most of the traffic.

If you need to know the 'user' (to determine who did what & when), then you either need an authenticating proxy, which can't be bypassed, or some other network authentication technology such as 802.1x port authentication, and some system that records temporal mapping of timeframe:user:ip:hostname:mac, which can then be retrieved later for reporting. .... that's a pretty advanced network though, and very likely outside if your ability to support.

Cameron Kerr
  • 4,069
  • 19
  • 25
  • Sadly the question is specific and your answer is not and totally wrong in regards to the question. – TomTom Sep 16 '14 at 12:10