Build a secure video surveillance system with your Synology NAS

This tutorial will guide you through the configuration of your own secure video surveillance installation with your Synology NAS

#1 My equipment

#2 Overview of my installation

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:

Assign static IP addresses on your local router

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:

Configure the cameras
Configure the cameras

#5 Create a shared folder to store the records

File Station

Create a shared folder “surveillance”, subfolders with the name of your cameras will be then automatically created:

Create a shared folder to store the records
Create a shared folder to store the records

#6 Configure Surveillance Station

#6.1 Configure the cameras

IP Camera
Configure the cameras
Configure the cameras

Save the videos in the shared folder you have previously created “/volume1/surveillance”:

Configure the cameras
Configure the cameras

#6.2 Configure the notifications

Notification
Notification
Configure the notifications
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%
Configure the notifications
Configure the notifications

#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”:

Configure the APC battery backup

#8 Configure the firewall

Allow:

Configure the firewall
Configure your firewall

#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

Forward ports on your residential gateway

#10 Change the default port for SSH

For security reason, change the default SSH port on both your local and remote NAS:

Change the default port for SSH

#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:

Synchronize the shared folder with the remote NAS
Synchronize the shared folder with the remote NAS

Add it in the “administrators” group, it is required for rsync:

Synchronize the shared folder with the remote NAS
Synchronize the shared folder with the remote NAS

Authorize the user to access rsync:

Synchronize the shared folder with the remote NAS
Synchronize the shared folder with the remote NAS

Enable rsync:

Enable 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:

Create a new sync task
Create a new sync task

#12 Configure DDNS on your local NAS

Configure DDNS to access your NAS using a DNS and configure a certificate:

Configure DDNS on your local NAS

#13 Configure a VPN server on your local NAS

Install the VPN server application:

VPN Server

Authorize a user to access the OpenVPN server:

Configure a VPN server on your local NAS
Configure a VPN server on your local NAS
Configure a VPN server on your local NAS
Configure a VPN server on your local NAS

Configure an OpenVPN server:

Configure an OpenVPN server
Configure an OpenVPN server

Note: You can tick “Allow clients to access server’s LAN” (see next note)

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:

OpenVPN

#15 Configure DS cam app on your smartphone

Configure DS cam app on your smartphone

#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.