To monitor internet usage and possibly the sites visited by a 15-year-old grandson who is being raised with a notebook, you can use a log router. Here's a detailed guide on how to set it up:
Introduction
A log router is a software or hardware device that records internet activity, including the websites visited, the duration of the visit, and the time of access. This guide will focus on setting up a log router on a Windows-based system using a free, open-source software called Wireshark.
Requirements
- A Windows-based computer with Wireshark installed
- A network adapter compatible with Wireshark
- Basic knowledge of networking and TCP/IP
Instructions
-
Install Wireshark
Download the latest version of Wireshark from official website and follow the installation instructions.
-
Configure Wireshark
Open Wireshark and click on "Interface List" on the top menu. Select the network adapter you want to monitor and click on "Start".
-
Filter Captured Packets
In the main Wireshark window, click on the "Filter" button and enter the following filter:
http. This will display only the HTTP traffic. -
Analyze the Data
Browse through the captured packets to see the websites visited. You can find the URL in the "HTTP" section of each packet.
Tips
- To save the captured data for later analysis, click on "File" > "Save As" and choose a file format.
- You can use regular expressions to filter specific websites. For example,
http.host contains facebook.comwill display only the traffic to Facebook.
References
Code Example
Below is a sample packet captured by Wireshark. The URL can be found in the "HTTP" section:
Frame 1: 67 bytes on wire (533 bits), 67 bytes captured (533 bits)
Ethernet II, Src: 00:0c:29:2e:9d:0a (00:0c:29:2e:9d:0a), Dst: 01:00:5e:00:0a:ac (01:00:5e:00:0a:ac)
Internet Protocol Version 4, Src: 192.168.1.101 (192.168.1.101), Dst: 192.168.1.1 (192.168.1.1)
Transmission Control Protocol, Src Port: 53604 (53604), Dst Port: 80 (80), Seq: 1, Ack: 1, Len: 576
HTTP
GET / HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,vi;q=0.8
Connection: keep-alive
Upgrade-Insecure-Requests: 1