Kismet: Saving the Kismet Database to a Samba Share
Date: 8 September 2020Table of Contents
- Introduction
- Samba Mount Configuration
- Kismet Configuration
- Conclusion
Introduction
For a while, I attempted to set up Kismet (running in a VM) in a way that would enable it to save the database (which is just sqllite) to a mounted Samba share. However, Kismet would just refuse to start and only provided cryptic error messages. After enough debugging, I found a solution that will allow it to work. Essentially, the trick is to the nobrl option for mount.cifs, which disables Byte-Range Locking. I'm not sure what secondary consequences this may have on Kismet, so proceed with mild caution.
Samba Mount Configuration
Edit your fstab file as follows:
sudo vim /etc/fstabAdd your mount entry at the bottom:
//192.168.1.xxx/SHARE /path/to/mount_point cifs username=USER,password=PASSWORD,workgroup=WORKGROUP,noauto,x-systemd.automount,x-systemd.idle-timeout=30,rw,nobrl 0 0Obviously, change the above line to match your configuration. Once the fstab file is edited, then reload the sytemd daemon:
systemctl daemon-reload systemctl restart remote-fs.targetThis should cause systemd to mount the share at /path/to/mount_point. Now, simply tell Kismet to use that path as the location to store the database.
Kismet Configuration
Edit the kismet logging configuraiton file:
sudo vim /usr/local/etc/kismet_logging.confEdit the log_prefix line:
log_prefix=/path/to/mount_pointNow just restart Kismet
sudo service kismet restartAnd that's it!
Conclusion
Kismet should load and run without complaints.