#1 My equipment
- 2 NAS: Synology DS118 + DS115j
- 2 network cameras: TRENDnet TV-IP315PI + TV-IP320PI
- 1 “8-Port” switch with PoE (Power over Ethernet): TRENDnet TPE-S44
- 1 UPS (Uninterruptible Power Supply): 550VA APC Back-UPS ES
- Several RJ45 Ethernet cables
#2 Overview of my installation
#3 Assign static IP addresses on your local router
On your residential gateway admin interface, assign static IP addresses for the local NAS and the cameras with their corresponding MAC addresses:
For example, on an SFR box, access the configuration panel from: http://192.168.1.1/network/dhcp
#4 Configure the cameras
Access the admin interface of the camera (for example http://<Static IP> for Trendnet cameras), then:
- Update the firmware (this action requires a reboot)
- Update the admin password (use maximum 16 characters)
- Update the HTTP port (this action requires a reboot)
- Update the datetime
#5 Create a shared folder to store the records
Create a shared folder “surveillance”, subfolders with the name of your cameras will be then automatically created:
#6 Configure Surveillance Station
#6.1 Configure the cameras
Save the videos in the shared folder you have previously created “/volume1/surveillance”:
#6.2 Configure the notifications
Configure the subject and content of the notification email that will be sent when motion is detected on one of the cameras:
Subject:
%CAMERA%-%DATE%-%TIME% Motion detected
Content:
CAMERA: %CAMERA%DATE: %DATE%TIME: %TIME%
#7 Configure the APC battery backup
An UPS (Uninterruptible Power Supply) can keep your NAS running for few more minutes after a power outage. It will allow the NAS to duplicate the last video records on your remote NAS.
It is possible to deactivate the beep sounds made by the UPS when the power is down. To do so, install the software “PowerChute Personal Edition”:
#8 Configure the firewall
Allow:
#9 Forward ports on your residential gateway
For example, on an SFR box, access the configuration panel from: http://192.168.1.1/network/nat
#10 Change the default port for SSH
For security reason, change the default SSH port on both your local and remote NAS:
#11 Synchronize the shared folder with the remote NAS
You can backup the videos records on a remote NAS.
#11.1 On your remote NAS
Create a user named <local-NAS-name>-sync:
Add it in the “administrators” group, it is required for rsync:
Authorize the user to access rsync:
Enable rsync:
Note: Don’t create the “surveillance” folder, it will be automatically created.
#11.2 On your local NAS
Note: Sync works only in one direction
Create a new sync task with:
- The IP address of your remote NAS
- The user <local-NAS-name>-sync previously declared on your remote NAS (cf. #11.1)
#12 Configure DDNS on your local NAS
Configure DDNS to access your NAS using a DNS and configure a certificate:
#13 Configure a VPN server on your local NAS
Install the VPN server application:
Authorize a user to access the OpenVPN server:
Configure an OpenVPN server:
Note: You can tick “Allow clients to access server’s LAN” (see next note)
- Export the configuration
- Edit the configuration file VPNConfig.ovpn and set the DNS of the local NAS:
remote <dns>.synology.me 1194
Note: Uncomment “redirect-gateway def1” to allow access to your local network
#14 Configure a VPN client on your phone
Copy the configuration file to your phone and use it to configure the connection. You can use for example OpenVPN app:
#15 Configure DS cam app on your smartphone
- Install DS cam app on your phone
- Enable the VPN connection between your phone and your NAS (“local” NAS)
- Connect to your NAS (“local” NAS)
#16 Browse the notification snapshots sent on your mailbox
I have developed an app to easily download the snapshots sent on your mailbox and to browse through them, filtering by date and camera.