51 lines
1.9 KiB
Markdown
51 lines
1.9 KiB
Markdown
# storage-security
|
|
|
|
Security solution for my storage locker. Deployed to a raspberry pi with an attached camera.
|
|
|
|
### Technology Stack
|
|
|
|
* Raspberry Pi 4 w/ camera
|
|
* GoCV
|
|
* Syncthing
|
|
|
|
The raspberry pi is configured as a WLAN AP which my phone will connect to. My phone will also be running syncthing and have the RPI configured as a sync device. The phone will pull logs and videos taken from the RPI which have been saved to the sync folder each time my phone connects.
|
|
|
|
The same folder on my phone is also a syncthing destination with spud, so when I come back upstairs, it uploads it to my server.
|
|
|
|
This isn't a foolproof method in case the intruder locates the RPI / camera and disables / destroys it / removes it. The data is still stored on the RPI until the next time I'm within proximity. This is an acceptable risk given the constraints, however if a better method is discovered to immediately store the data outside of the storage unit that would be preferred (something low powered sitting in my vehicle? )
|
|
|
|
### Raspberry Pi Setup
|
|
|
|
Full steps to re-build this system are below.
|
|
|
|
##### Prerequisites
|
|
|
|
1. Connect the camera
|
|
2. Image the SDcard with Raspberry Pi OS Lite (minimal image based on debian) - make sure to pick lite - do not use the desktop version.
|
|
|
|
##### Boot optimizations
|
|
|
|
Edit /boot/config.txt
|
|
|
|
```conf
|
|
# Disable the rainbow splash screen
|
|
disable_splash=1
|
|
|
|
# Disable bluetooth
|
|
dtoverlay=pi3-disable-bt
|
|
|
|
# Set the bootloader delay to 0 seconds. The default is 1s if not specified.
|
|
boot_delay=0
|
|
```
|
|
|
|
Edit /boot/cmdline.txt to make kernel quiet. The following is an example, the key part is the quiet flag
|
|
|
|
```conf
|
|
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=32e07f87-02 rootfstype=ext4 elevator=deadline fsck.repair=yes quiet rootwait
|
|
```
|
|
|
|
Disable dhcpcd - useless service in this case
|
|
|
|
```bash
|
|
sudo systemctl disable dhcpcd.service
|
|
``` |