Re-installing SSL Certificate for QNAP (via SSH) if unable to access admin web interface

Get WinSCP or any ssh client and to be able to access the NAS via SSH. Start the ssh client, you now should enter your NAS and you will see it is in a sub-folder Root.
Open the “/ ; ” folder above it. You will see a whole list of other folders.

Browse to /etc/default_config/stunnel; just click these folders one by one to open them.
As you click you will see this path in the address bar of WinSCP at the top, so cannot go wrong.
Select all the files showed here (hold shift and click left mouse) and copy them (click right mouse to get Copy command) to a folder on your PC/Laptop.
You will be prompted a pop-up window where you can select the folder the files must be copied to. Next browse to /etc/config/stunnel.

Now Copy or use drag/ drop to copy the default config files from your PC/ laptop back to your NAS, but into the /etc/config/stunnel folder.
You will be asked if you want to overwrite the existing files. Yes to all. That’s it. No need for reboot: You should be able to access the web-admin pages of your NAS via https:// ; instantly.

Btw, as long as there is no hardware issue, you should be able to access all of your data via Windows by using the Network Drive function in windows explorer or use FTP.

Another method is :

Verify thttpd (admin web server) and stunnel (https) access to the admin Web server are running fine, using the following command:

[/] # ps -ef | grep thttpd
2615 admin 2988 S /usr/local/sbin/_thttpd_ -p 8080 -nor -nos -u admin –
2849 admin 2832 S /usr/local/sbin/Qthttpd -p 80 -nor -nos -u admin -d /
10548 admin 580 S grep thttpd

Ensure both services are running:

[/] # /etc/init.d/ restart
Shutting down thttpd services: thttpd.
Starting thttpd services: thttpd.
[/] # /etc/init.d/ stop
Shutting down stunnel services: stunnel.

Ensure stunnel is running properly and restore the stunnel.pem from default config, using the below command:

[/] # /etc/init.d/ stop
Shutting down stunnel services: stunnel.
[/] # cp /etc/default_config/stunnel/stunnel.pem /etc/stunnel/stunnel.pem
[/] # ls -ls /etc/stunnel/stunnel.pem
4 -rw-r–r– 1 admin administ 3467 Aug 4 20:43 /etc/stunnel/stunnel.pem
[/] # /etc/init.d/ start
Starting stunnel services: stunnel.

1 comment

    • cisco on February 7, 2016 at 9:52 pm
    • Reply

    Thx! it helped

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.