{"id":252,"date":"2015-12-31T16:21:50","date_gmt":"2015-12-31T16:21:50","guid":{"rendered":"https:\/\/carson.fenimorefamily.com\/?p=252"},"modified":"2016-01-01T17:32:47","modified_gmt":"2016-01-01T17:32:47","slug":"good-settings-for-qnap","status":"publish","type":"post","link":"https:\/\/carson.fenimorefamily.com\/?p=252","title":{"rendered":"Good Settings for QNAP"},"content":{"rendered":"<p>The last few years of using my QNAPs have been great.  QNAP isn&#8217;t perfect but it is a good, quiet, Linux-ish platform for serving up files. Since some of my family are buying their own, I thought I would document some of the settings I commonly change:<\/p>\n<ul>\n<li>General: I force HTTPS (its silly and unsecure not to); I tend to give QNAPs hostnames that allow for future growth (fenqnap-1, fenqnap-2), etc., Synchronize with NTP (important for making sure that a pair of QNAPs all are in sync), <\/li>\n<li>Storage manager: When i provision a new QNAP I use thin provisioning to form a storage pool, as this lets you flexibly break out individual volumes of any size &#8211; either thin or thick will let you do snapshotting. On my volumes I always enable encryption &#8211; but DO NOT save the password (it entirely defeats the purpose of disk encryption!).  Also do NOT use static single volume &#8211; its too limiting!<\/li>\n<li>Networking: On my TS-453 Pro I have four NICs. I bond two using the ALB scheme, and use that as my default gateway.  I then leave two free, since for virtualization I only had luck configuring the virtual switch on a non-trunked eth. The ALB scheme has two advantages: load balancing and redundancy.  Each client will ask for files over a given interface, but the QNAP use an output eth based on a hashing scheme.  Additionally, having ALB turned on means that if one link goes down, it will be removed from the hashing scheme, and the other links will be used instead.<\/li>\n<li>Security: I allow all connections, but on &#8220;Network Access Protection&#8221; I lock multiple failed attempts out forever<\/li>\n<li>Hardware: I disable beeps for system operations &#8211; QNAPs are a bit too beepy<\/li>\n<li>Power: I make sure the QNAP always turns back on.<\/li>\n<li>Notification: Configure to send alerts to your email<\/li>\n<li>Shared Folders: I like to group things at a shared folder level &#8211; pictures in one folder, docs in another, music in another, ISOs in another, etc.  It turns out that if you don&#8217;t group by the shared folder level, you can run into some funky permissions problems (specifically: I found I couldnt reliably restrict access to my photos even when &#8220;Advanced Permissions&#8221; clearly limited access &#8211; it appeared that QNAP was accessing photos via the admin user, which always has access; i filed a bug with qnap but they dont appear to have resolved it entirely).  I also enable &#8220;Advanced Folder Permissions&#8221; to let me lock out individual files via setfacl\/getfacl.\n<\/li>\n<li>Network sharing (&#8220;Win\/Mac\/NFS&#8221;) &#8211; I like leaving windows (smb) and mac (AFP) enabled, but NFS just isnt secure, so i disable it.<\/li>\n<li>FTP: Disable it &#8211; its unsecure<\/li>\n<li>Network recycle bin: I disable it &#8211; it doesn&#8217;t fit any workflow I use, and I dont want stuff piling up in it.<\/li>\n<li>QSync: In the past I have disabled this, but I do think it could be useful.  Until recently I was pretty fine keeping all my data on the NAS.  There are times, when I am away from the Internet for example, where I want to at least, say, edit my journal, then sync to the NAS later.  QNAP&#8217;s QSYNC feature directly addresses this concept, even letting you resolve conflicts (say multiple people are editing a file, for example) and keep versions.  QNAP stores your qsyncs inside the users home directory on the NAS.  Even though this feature is useful, I think I still prefer my own thing: 1) nightly snapshots on the QNAP, and 2) rsyncs in crontabs.  Why?  First of all, QSync only runs on mac\/windows, so Linux is SOL. Second, the QSync client is very limiting: it only lets you specify a single location where you put all your files.  That might work, except even if I symlink in other locations it doesn&#8217;t do the right thing. Nothwithstanding my reservations, I think QSync is great for single-folder to single-folder stuff.  In my case Ill stick to rsync and crontab.<\/li>\n<li>Station manager: I disable the music station, as the iTunes server is the only real way I would stream music from the QNAP.<\/li>\n<li>Multimedia management: I disable indexing images in my document folder.  The idea is: I&#8217;d like one location where even images, such as sensitive document scans, aren&#8217;t indexed for general viewing<\/li>\n<li>VPN Server: I enable this, even though I don&#8217;t use it, because QNAP appears to do crazy things when running your own openvpn client unless there is already some VPN service enabled.<\/li>\n<li>Antivirus: I do daily scans<\/li>\n<li>*: Pretty much everything else gets disabled<\/li>\n<\/ul>\n<p>On top of this I configure my own key-based (passwordless) VPN, and then setup individual backup jobs in the backup station.  I describe how to set up password-less VPN in <a href=\"https:\/\/carson.fenimorefamily.com\/?p=143\">a previous post<\/a>.   Each job connects to my backup QNAP over the VPN. I enable encryption, and also have the job apply custom permissions (be sure Advanced Permissions is enabled on the other QNAP!).  I have each job auto-sync on a schedule.  <\/p>\n<p>Note: I don&#8217;t use RTRR, even though it seems cool, because it doesn&#8217;t fit my workflow &#8211; i don&#8217;t want the QNAP auto-sycning live, as it would eat up too much bandwidth &#8211; im ok with a nightly sync.   Plus I have no idea what RTRR uses as a protocol &#8211; and I am doubtful whatever it is really is superior to rsync (not that I am incredulous, but if it is QNAP sure is keeping it a secret).<\/p>\n<p>Note2: On the destination QNAP I go into the Backup station and enable the rsync server &#8211; but only the middle checkbox (you dont need to enable the one that makes you enter a username and password). Once enabled, you can create a user, or just use admin, then on the source QNAP just use that users credentials to enable the rsync. <\/p>\n<p>Note3: I don&#8217;t use myqnapcloud.  It is a nice service, but since I have my own VPN I can access my QNAPs just as if I were at home.  <\/p>\n<p>Note4: In terms of extra apps I get by with simply installing the HDStation and the CodexPack to enable HW-accelerated transcoding.  I also use virtualization station so I can run a few &#8220;real&#8221; linux VMs on the QNAP.  I&#8217;ve been very interested in container station, but as yet havent got it to work.<\/p>\n<p>Note5: Be sure you run nessus, or nmap, to get a good profile of any vulerabilities on your QNAP.  I found a few ports, like 631, that absolutely did not need to be open; in some cases I found a service that was configured but that I didn&#8217;t need, so i shut it down.  Sadly in the ipp (631) case, I could find no way to shut it down.<\/p>\n<p>Note6: If you want to do your own version of qsync, I just setup password-less logins from all the sync &#8220;sources&#8221;, then create a directory (or set of directories) I want to sync.  I wrote a single script to sync these folders, something like:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/bash\r\n# Backup docs\r\nrsync -auvhP \/local\/path\/syncToNas\/* admin@qnap1:\/share\/CE_CACHEDEV2_DATA\/DocShare\/mac\r\n# Backup passwords\r\nrsync -auvhP \/local\/path\/.password-store admin@qnap1:\/share\/CE_CACHEDEV2_DATA\/DocShare\/passwords\/\r\n<\/pre>\n<p>You can put this script, call it backupMac.sh (or whatever), in your \/local\/path\/syncToNas to be sure your script, and your local files, are synced.  Your crontab would then just be something like:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n* * * * * \/local\/path\/syncToNas\/backupMac.sh 2&gt;&amp;1 &gt; \/dev\/null\r\n<\/pre>\n<p>Of course this only works on Mac and Linux; for windows maybe you go ahead and use qsync.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The last few years of using my QNAPs have been great. QNAP isn&#8217;t perfect but it is a good, quiet, Linux-ish platform for serving up files. Since some of my family are buying their own, I thought I would document some of the settings I commonly change: General: I force HTTPS (its silly and unsecure &hellip; <a href=\"https:\/\/carson.fenimorefamily.com\/?p=252\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Good Settings for QNAP<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-252","post","type-post","status-publish","format-standard","hentry","category-qnap"],"_links":{"self":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252"}],"version-history":[{"count":8,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions\/263"}],"wp:attachment":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}