Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syno:dsm6inst [2021/03/28 14:49] – [Calendar] Bernard Condrausyno:dsm6inst [2022/11/18 00:59] (current) – [DDNS over Namecheap] Bernard Condrau
Line 18: Line 18:
   - To setup SSL, import __server.key__, __domain.crt__, and __domain.intermediate.crt__ through //Control Panel --> Security --> Certificate --> Add//. Right click on the new certificate, "Edit" to make it default, "Configure" to assign it to services. Detailed instructions see [[https://miketabor.com/secure-synology-nas-install-ssl-certificate/|Secure your Synology NAS, install a SSL certificate]] and [[https://www.sslshopper.com/how-to-move-or-copy-an-ssl-certificate-from-one-server-to-another.html|How to Move or Copy an SSL Certificate from one Server to Another]].   - To setup SSL, import __server.key__, __domain.crt__, and __domain.intermediate.crt__ through //Control Panel --> Security --> Certificate --> Add//. Right click on the new certificate, "Edit" to make it default, "Configure" to assign it to services. Detailed instructions see [[https://miketabor.com/secure-synology-nas-install-ssl-certificate/|Secure your Synology NAS, install a SSL certificate]] and [[https://www.sslshopper.com/how-to-move-or-copy-an-ssl-certificate-from-one-server-to-another.html|How to Move or Copy an SSL Certificate from one Server to Another]].
   - Add Two-factor-authentication to your admin user. Select **Options -> Personal** on the top right of the DSM window. Settings are saved in<code>/usr/syno/etc/preference/username/google_authenticator</code>   - Add Two-factor-authentication to your admin user. Select **Options -> Personal** on the top right of the DSM window. Settings are saved in<code>/usr/syno/etc/preference/username/google_authenticator</code>
 +
 +===== DDNS over Namecheap =====
 +  - Add the host to be accessed with DDNS to your domain's //Advanced DNS --> Dynamic DNS// in Namecheap
 +  - Make sure you installed php-curl and php-xml in your [[deb11:apache#php_installation|Apache 2.4 and PHP 7/8]] installation
 +  - Add the following script to your webserver:<code><?php
 +try {
 +        $url = 'https://dynamicdns.park-your-domain.com/update?host='.$_GET['host'].'&domain='.$_GET['domain'].'&password='.$_GET['password'].'&ip='.$_GET['ip'];
 +
 +        // with allow_url_fopen enabled
 +        $output = file_get_contents($url);
 +
 +        // with curl
 +        //$req = curl_init();
 +        //curl_setopt($req, CURLOPT_URL, $url);
 +        //curl_setopt($req, CURLOPT_RETURNTRANSFER, true);
 +        //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml'));
 +        //$output = curl_exec($req);
 +        //curl_close($req);
 +
 +        $xml = new SimpleXMLElement(trim(str_replace("encoding=\"utf-16\"","",$output)));
 +        if ($xml->ErrCount > 0) {
 +                $error = $xml->errors[0]->Err1;
 +                if (strcmp($error, "Domain name not found") === 0) {
 +                        echo "nohost";
 +                } elseif (strcmp($error, "Passwords do not match") === 0) {
 +                        echo "badauth";
 +                } elseif (strcmp($error, "Passwords is empty") === 0) {
 +                        echo "badauth";
 +                } elseif (strcmp($error, "No Records updated. A record not Found;") === 0) {
 +                        echo "nohost";
 +                } else {
 +                   echo "911 [".$error."]";
 +                }
 +        } else {
 +                echo "good";
 +        }
 +} catch (Exception $e) {
 +    echo "911 [".$e->getMessage()."]";
 +}</code>
 +  - Make sure the DDNS update call is allowed by your webserver. For apache, add this to the conf:<code><RequireAny>
 +Require expr "%{QUERY_STRING} =~ /your Namecheap DDNS password/" # allow the DDNS updater to run from the changed ip address
 +Require forward-dns host.domain.tld # allow access from the DDNS domain name after updating the ip address
 +</RequireAny></code>
 +  - Create a custom DDNS updater in Synology DSM with the following //Query URL//:<code>https://vps.condrau.com/html/ddns-namecheap.php?host=__USERNAME__&domain=__HOSTNAME__&password=__PASSWORD__&ip=__MYIP__</code>
 +  * [[https://code-bude.net/2022/02/16/namecheap-com-ddns-in-synology-dsm-einrichten/|Namecheap.com DDNS in Synology DSM einrichten]]
 +  * [[https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-to-dynamically-update-the-hosts-ip-with-an-http-request/|How to dynamically update the host's IP with an HTTP request?]]
  
 ===== Certificates ===== ===== Certificates =====
Line 102: Line 148:
   * [[https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General_Setup/How_to_migrate_between_Synology_NAS_DSM_5_0_and_later|How to migrate between Synology NAS (DSM 5.x)   * [[https://www.synology.com/en-global/knowledgebase/DSM/tutorial/General_Setup/How_to_migrate_between_Synology_NAS_DSM_5_0_and_later|How to migrate between Synology NAS (DSM 5.x)
 ]] ]]
 +
 +===== Change hostname =====
 +  * Change //Server Name// in //Control Panel --> Network --> General//
 +  * Update:<code>sudo vim /etc/synoinfo.conf
 +custom_login_title="hostname"</code>
 +  * Update:<code>sudo vim /etc/sysconfig/network
 +HOSTNAME=hostname</code>
 ===== MailPlus Server ===== ===== MailPlus Server =====
   * Copy DKIM Settings following {{ :syno:synology_mailplus_server_admin_guide_enu.pdf |MailPlus Server Admin Guide}} page 72 to your DNS.   * Copy DKIM Settings following {{ :syno:synology_mailplus_server_admin_guide_enu.pdf |MailPlus Server Admin Guide}} page 72 to your DNS.
 +  * [[syno:dsm6dns|DNS Settings]]
  
 ===== Contacts ===== ===== Contacts =====
Line 121: Line 175:
   - Make sure you select the correct calendar as default for new appointments on your Android device   - Make sure you select the correct calendar as default for new appointments on your Android device
 https://domain.name.tld:5001/caldav/<user>/ # internet</code> https://domain.name.tld:5001/caldav/<user>/ # internet</code>
-  * Note: CalendarSync for Android is another CalDAV client, it is not freee, but has an automated setup for Synology DSM.+  * Note: CalendarSync for Android is another CalDAV client, it is not free, but has an automated setup for Synology DSM.
   * [[https://www.davx5.com/tested-with/synology|DAVx⁵ has been successfully tested with Synology DSM]]   * [[https://www.davx5.com/tested-with/synology|DAVx⁵ has been successfully tested with Synology DSM]]
  
Line 169: Line 223:
 sudo chmod 600 authorized_keys</code> sudo chmod 600 authorized_keys</code>
   * [[https://forum.synology.com/enu/viewtopic.php?t=126166|Logging into Synology SSH using a key instead of a password]]   * [[https://forum.synology.com/enu/viewtopic.php?t=126166|Logging into Synology SSH using a key instead of a password]]
 +  * [[https://kb.synology.com/en-global/DSM/tutorial/Why_can_t_I_connect_to_my_Synology_NAS_over_the_Internet_via_QuickConnect|I can't connect to my Synology device via QuickConnect]]
  
 ===== Rsync ===== ===== Rsync =====
Line 204: Line 259:
   * [[:syno:photo|Photo Station]]   * [[:syno:photo|Photo Station]]
   * [[:syno:mailplus|MailPlus Server]]   * [[:syno:mailplus|MailPlus Server]]
 +  * [[syno:webstation|Web Station]]