I want to know which websites/URLs are visited by users of my home computer's guest account.
Is there a way to log this and save it as nicely formatted list to the disk? I only need date/time and visited URL. If possible, full URLs would be nice, but domain only is also good for a start.
Update:
After having read the linked answers and suggestions in the chat from A.B., I ran the following command:
$ sudo iptables -A OUTPUT -m owner --uid-owner 499 -j LOG --log-prefix='[GUEST INTERNET ACCESS] '
after having set the guest account UID to the fixed UID 499 following Set or determine the UID range for guest accounts.
But the /var/log/kern.log still doesn't contain those logs but lots of messages by apparmor that tell it denied something:
Nov 18 11:19:22 wolf-pack kernel: [ 1030.063374] audit: type=1400 audit(1447841962.731:164): apparmor="DENIED" operation="connect" profile="/usr/lib/lightdm/lightdm-guest-session" name="/run/systemd/journal/stdout" pid=4693 comm="dbus-daemon" requested_mask="w" denied_mask="w" fsuid=499 ouid=0
I have posted a separate question about the AppArmor problem here: AppArmor blocks logging set up through iptables for guest account - How to enable?