I need to monitor the websites being visited on my wifi network by the different IPs connected to the network. What is the best way to do this? I spent some time with Wireshark but I feel it is a bit overkill for doing this. Is there a cleaner/more efficient way to do this?
The exact answer to this depends on the level of control you have over the wifi network.
Assuming that you can dictate things like proxy servers, then the best option might be to install a forward proxy (something like squid) and then have that do the logging for you.
If you need to know actual URLs rather than just sites, you'll need to set-up SSL interception which involves things like deploying SSL root certs to your clients and also places a large responsibility on you to secure the proxy and certificate infrastructure (failing to do so could impact the security of everyone on your network), so I'd avoid that unless you really need to.
It depends on what hardware you have available.
For example, if you have the possibility of plugging in the network e.g. a Linux server, you could set it up as a gateway. It's more complicated, but way more efficient and a whole lot cleaner:
-- router ------ network server -- WiFi AP -- ( NETWORK: 192.168.3(*).2...254 ) 192.168.1.1 1.1 2.1 2.2 3.1(*) (*) or 192.168.1.1 *again*, if you *really* want to be sneaky
- log all sites visited transparently (privacy issues may apply) - bundled
- employ caching: with suitable rules, I get top-notch performances out of my oh-not-so-great home DSL - almost bundled, need to setup rules
- prevent some sites or file types from being visited at all (see ACL in the Squid manual), which in turn has great applications for anti-ad, malware blocking and so on - almost bundled, again you need to setup rules (but there are public lists for those)
- add antivirus and antispam support (you need extra packages such as Amavis and SquidGuard)
- all the above for SSL sites too (this requires setting up what amounts to a man-in-the-middle attack; doable, but leave it for last and be sure to read the documentation and tutorials).
I once wrote a script in Python to sniff DNS requests off the wifi network and log website names (host+domain names) users are visiting/resolving. Using the Python scapy library, its quite simple. The data was logged into mysql in order to be able to get various statistic afterwards.
I dont't have the script available at the moment, but if you dont't find another solution, I could send you the script on monday.
Log dns queries and match them to client ip. Doesn't work if client changes dns server though. If one has a wifi network, they have a router as well. Router usually provides dhcp and dns services. Any decent wifi box has logging features that can be enabled to log traffic to some extent. Another way is to modify dhcp to provide another dns box which logs queries.