Original content from synology forum http://forum.synology.com/enu/viewtopic.php?f=36&t=21704.
Spain Translation by ricardocruz.es.
Copied here with more details, includes screenshot. Procedures is 99% the same. Only one openssl command is modified because startssl.com no longer accept MD5 csr.
Visit original thread for latest update.
Create an account from startssl.com and setup domain validation
- Use firefox to navigate to www.startssl.com
- Click ‘Sign up for free’
- Fill in the sign up form with real information, your certificate will be voided once your data provided is found fake.
- An vertification email will be sent to your email address, read your email and input the verification code.
- An certificate will be installed to firefox for account authenticate purpose.
- Backup the certificate from firefox, click ‘Tools’ menu / ‘Options’ / ‘Advanced’ / ‘Encryption’ / ‘View Certificate’
- Click ‘Your Certificates’, select the certificate deployed by startssl.com and then click ‘Backup’ button, save the certificate to some location. This step is very important and make sure you keep the backup safe, if you lost the certificate, you lost your account.
- Once the account creation is completed, restart firefox and navigate to startssl.com again.
- Click ‘Control Panel’
- Click ‘Authenticate’, a pop up window will be shown, click ‘ok’.
You will redirect back to the control panel.
- Click ‘Validation wizard’, select ‘Domain name validation’ type then click Continue button.
- Input your domain name and then click ‘Continue’ button.
- A list of possible email addresses associated with your domain name is shown. Select an email address for verification of domain ownership. Click ‘Continue’ button.
- Login to the mailbox, grab the verification code and then input to the verification page.
Generate private key and certificate submit request with DiskStation
Now we got a working account startssl.com, continue the setup with DS207+. Before the setup, we need to pick a private samba share to store the private key and certificate generated by the diskstation, for example, a samba share named ‘private‘ is picked and the path of the share is /volume1/private.
SSH to the diskstation as root and perform the commands below
- cd /usr/syno/
- mkdir ssl
- cd ssl
- wget http://123adm.free.fr/home/pages/documents/syno-cert_fichiers/openssl.cnf
- mkidr /volume1/private/ssl
- cd /volume1/private/ssl
- openssl genrsa -des3 -out ssl.key 2048
A passphrase is asked, make sure you remember the passphrase. The private key ssl.key will be generated to /volume1/private/ssl
- openssl rsa -in ssl.key -out ssl.nopp.key
- openssl req -sha1 -nodes -new -key ssl.key -out ssl.csr
$ Enter pass phrase for ssl.key: (Input the same passphrase here)
$ Country Name (2 letter code) [AU]: (Input prefix of the country)
$ State or Province Name (full name) [Some-State]: (Input State or Province name)
$ Locality Name (eg, city) : (Input City)
$ Organization Name (eg, company) : (Input The name of your company)
$ Organizational Unit Name (eg, section) : (Input unit name)
$ Common Name (eg, YOUR name) : (Input the domain name of your diskstation, i.e. ds207p.mydomain.com)
$ Email Address : (your email address)
$ Please enter the following ‘extra’ attributes to be sent with your certificate request
$ A challenge password : (Just press enter)
$ An optional company name : (Just press enter)
Now the file ssl.csr is generated. The setup of Diskstation is temporary done. Go back to the firefox and login to startssl.com.
Create certificate for diskstation from startssl.com
- Login to startssl.com using firefox.
- Make sure domain validation is already completed before continue.
- Click ‘Certificates Wizards’
- Certificates Target, select ‘Web Server SSL/TLS Certificate’ and click ‘Continue’ button.
- In the ‘Generate Private Key’ screen, just click the ‘Skip’ button.
- Now in the ‘Submit Certificate Request (CSR) screen, use notepad to open the ssl.csr file, copy and paste the content of ssl.csr to the textbox, then click ‘Continue’ button again.
- In the ‘Certificate Request Received’ screen, just click the ‘Continue’ button.
- In the ‘Add Domain’ screen, input the subdomain assign for your diskstation, example ds207p.mydomain.com, then input ds207p here. Click ‘Continue’ button for next screen.
- In the ‘Ready Processing Certificate’ screen, click the ‘Continue’ again.
- In the ‘Save Certificate’ screen, copy the content shown in the textbox, paste the content to notepad and then save it as ssl.crt. You should save it to the private share that we previously picked.
- Also save the intermediate (sub.class1.server.ca.pem) and root CA certificates (ca.pem) to the private share as well. (Just highlight the link, right click and select ‘save hyperlink as’.
- Once the 3 files is saved, click the ‘Finish’ button.
Setup Apache and Import the certificate to Diskstation
Now startssl.com is done, we go back to the diskstation and finish the setup.
- Open a browser and login to the Synology Station Manager with your admin account.
- Go to ‘Management’ / ‘Network Services’ / Web Services’
- Click the option ‘Enable HTTPS connection’.
- Click the ‘Import Certificate’ button.
- For ‘Private Key:’, select the ssl.nopp.key from the private share. For ‘Certificate’, select the ssl.crt file. Click ‘OK’ button.
Done!! The diskstation is encrypted with your own, valid but free certificate!! No more reminder when browsing diskstation using https now.
Backward support for old browser
In order to support some older browser, we need to adding the root and intermediate CA certificate to the Diskstation manually. If all the browsers in your orgainization already recognize startssl.com as a valid Certificate Authority, then you might skip this section.
- SSH to the diskstation as root
- cd /volume1/private/ssl
- mkdir /usr/syno/etc/ssl/ssl.root
- cp ca.pem /usr/syno/etc/ssl/ssl.root/
cp sub.class1.server.ca.pem /usr/syno/etc/ssl/ssl.root
- chown root:root /usr/syno/etc/ssl/ssl.root/*.pem
chmod 400 /usr/syno/etc/ssl/ssl.root/*.pem
- vi /usr/syno/apache/conf/extra/httpd-ssl.conf-user
Look for the line below
Insert the line below
Look for another line below
Insert the line below
- Save the file.
- Repeat the same steps for the file /usr/syno/apache/conf/extra/httpd-ssl.conf-sys
- Restart the apache as below
# /usr/syno/etc/rc.d/S97apache-user.sh restart
# /usr/syno/etc/rc.d/S97apache-sys.sh restart
Done. Now I can visit my DS using https without all the browser warning!!