If you are accessing your Synology DiskStation from outside your home network, there are a few things that can help you with regards to security and hacking.
Issues like the SynoLocker ransomware shouldn’t have happened. This particular ransomware was possible because people didn’t patch and update their devices in a timely manor, for whatever reason. The patch for this vulnerability was actually released several months before the first attack.
It is understandable that people were upset about getting hit with this ransomware, but some basic security would have prevented it.
Synology Security Advisor
The new Security Advisor in DSM 5.1 is a big help for people securing their devices. It performs up to 35 checks (currently) to make sure your device is working securely. There are three available settings for the baseline checks,
- For home and personal use,
- For work and business use,
The first two options select a specific subset of the checks to run. Personally, I would choose Custom and select all of the checks.
Once you have picked an option, run a scan and see how you fair. If there are any warnings or errors, try to fix the issue. If you are not sure about a setting, check the Synology Forums, they are a great source of information.
If you have green across the board, you are going great.
Here is my list of extra steps that people should consider doing to help secure their Synology devices. These go above and beyond the list of checks that Synology do in their Security Advisor, so if you have all green ticks for the checks above, then give these a go…
1. Disable The Default Administrator Account
This one is not so obvious, but everyone who has a Synology device knows the name of the default admin account. It will be the account that all hackers will try to attack.
- Go to the Users section in the Control Panel,
- Create a new user. Call this user something other than “admin”,
- Make sure it’s a member of the Administrators group,
- Logout, and login as this new user account,
- Disable the default “Admin” account.
2. Use 2-Step Verification
2-step verification helps with making sure only you can login with your account. It consists of a 6-digit number than changes every 60 seconds. The numbers appear to be random, but are actually calculated from a complicated mathematical formula.
You will need to install an app on your phone to give you the 6-digit numbers. I use the Google Authenticator app but there are many others available. the Google version is only available on the Google Play Store and the Apple App Store. For the Windows Phone Store, I picked the Microsoft Authenticator as I believe it uses the same algorithm…
Before you enable 2-step verification, you need to make sure the date and time on your device is accurate. The best way to do this is to use a reliable time source…
- Log on to your DiskStation with an administrator account,
- Open the Control Panel,
- Go to the Regional Options section,
- Under the Time Setting part, select Synchronise with NTP server,
- Enter pool.ntp.org into the Server Address box
- Click Update Now
To enable 2-step verification for an account…
- Log on to your DiskStation with the account you want to use,
- Click the Person Icon in the title bar, top right,
- Click the Options menu item,
- Tick the box labelled Enable 2-Step Verification,
- Run through the wizard that appears, make sure you read the instructions…
To test, simply logout, and log back in again. When you enter your username and password, instead of being logged in, a new box appears asking for the 6-digit code that is displayed on your phone.
3. Default Ports
The default ports that the Synology DiskStations use for the web interface are 5000 and 5001. It’s a very good idea to change these ports to something else.
To do this, first pick a number between 1024 and 65000, I’ll use 12345 as an example…
- Open the Control Panel,
- Go to the Network section,
- Select the DSM Settings tab,
- Enter the port number you thought of (12345) into the HTTP field,
- Enter the port number plus one (12346) into the HTTPS field,
- If you are using HTTP, you should consider HTTPS.
The Synology DSM has a built in firewall. You can use this to block access to your DiskStation.
The default way the firewall it set up by Synology is to have separate firewall rules for each application or port that is used. Personally I find this messy, as there are too many rules which could overlap and conflict.
Access the firewall settings in the Control Panel, Security section.
Instead I have just three rules. While this works for me, your situation may call for more rules than this…
- Allow all traffic on all ports from my local network,
- Allow only HTTPS port (12346 from the example above) from IPs in England (where I live),
- Allow only various application ports (web, owncloud, etc) from IPs in England,
If no rules are matched, then deny access.
Now, I know that IP addresses can be spoofed quite easily, but this helps beat a lot of the mass attacks coming from China, Russia and the USA.
You may want to have a few more rules, just remember to try and keep it simple. If you over complicate things, you may open a hole in your network.
5. Auto Block
The Auto Block feature is another new addition to DSM 5.1. It allows you to block users on specific IP addresses trying to login to your DiskStation too many times. Auto Block is also in the Security section of the Control Panel. two tabs over from the Firewall.
- Tick the box labelled Enable auto block,
- Enter a number for the Login attempts field, (I have mine set to 5),
- Enter a number for the Within (minutes) field, (again I have 5 for this),
This means that anyone entering their password incorrectly 5 times, within the space of 5 minutes, will get their IP address blocked. This is a low enough number of attempts in a long enough time window that I can catch quite a lot of attempts.
- If you want to enable block expiration option, tick the box. This will automatically allow a blocked IP address to become unblocked. I don’t have this set. Once blocked, you stay blocked.
One thing to be aware of however, since I am not automatically unblocking IP addresses, there is a chance I might get blocked myself. The way around this is to add a known internal IP address to the Allow/Block List. This way, if you do get blocked, you just need to change your IP address to this specific address and connect to your device. You can then unblock yourself. Never specifically allow an external (internet) address.
6. More Coming Soon
I will add any more security options here, if you know of any good tips that you think other people should know about, leave it in the comments.