Posts tagged Synology

Switching Apache to Nginx and Selfoss

0

After updating the Synology and switch webserver from Apache to Nginx, the web-based RSS reader selfoss stopped working. This application uses a .htaccess file to rewrite all requests in Apache. Unfortunately, Nginx doesn’t support .htaccess files.
Make these adjustments in: /etc/nginx/app.d/server.webstation-vhost.conf (last line before the final closing bracket ‘}’. Keep in mind, the space after $1 belongs in the configuration file. If you forget about this nginx won’t restart (with the command: nginx -s reload).

# Custom configuration by Randy - Fix SelfOss RSS reader
location /selfoss {
 root /volume1/web;
}
location ~ ^/selfoss/$ {
 index index.php;
}
location ~ ^/selfoss/favicons/(.+)$ {
 try_files /selfoss/data/favicons/$1 =404;
}
location ~ ^/selfoss/(.+)$ {
 try_files /selfoss/public/$1 /selfoss/index.php$is_args$args;
}

If you also want to switch other applications from Apache reverse proxy to Nginx, the configuration would be:

# Custom configuration by Randy - Add reverse proxies
location /sabnzbd {
  proxy_pass http://127.0.0.1:8080;
}
location /sb {
  proxy_pass http://127.0.0.1:8083/sb;
}
location /transmission {
  proxy_pass http://127.0.0.1:9091/transmission;
}
location /couchpotato {
  proxy_pass http://127.0.0.1:5053/couchpotato;
}
# Spotweb fix for API via NGingx
location /spotweb {
 if ($uri !~ "api/"){
 rewrite api/?$ /spotweb/index.php?page=newznabapi last;
 }
}

Synology Disk Station Manager 6.1 Beta

0

Yesterday, Synology unveiled the newest version of her Disk Station Manager: 6.1 Beta. Testers are urged to download this build and test out new features. Amongst others, these are PHP7-support, a switchable web front end between Apache (2.2) and NGinx. The resource manager is extended with lots of new features showing per-process indication of disk, cpu and network use. The Storage Manager let’s users switch from SHR-1 (RAID5) to SHR-2 (RAID6) online.

Furthermore, a new package calles Active Directory Server will be available soon. I guess this DS is based on Samba 4, the Windows file sharing service for Linux. Starting with version 4.0, Samba is able to run as an Active Directory (AD) domain controller (DC).

More information, features and downloads can be found on the Synology DSM 6.1 Beta website.

Synology DSM6 and mod_proxy

3

Since Synonoly released version 6 of Disk Station Manager (DSM), things in the Apache configuration where changed. I used to have a reverse proxy using Apache mod_proxy. The old configuration was stored in /etc/httpd/sites-enabled-user/httpd-vhost.conf (or httpd-ssl-vhost.conf in my case since I use SSL). The new configuration to put your reverse proxy configuration can be found in: /usr/local/etc/httpd/sites-enabled/httpd-vhost.conf-user.

To set-up a reverse proxy to services listening on strange ports, like SabNZBd, SickRage / SickBeard, CouchPotato or Transmission use these lines as an example and edit them to your needs. With this configuration you should be able to download your CentOS images from usenet without getting blocked by the company firewall…

<Location /sb>
  ProxyPass http://127.0.0.1:8083/sb
  ProxyPassReverse http://127.0.0.1:8083/sb
</Location>

<Location /sabnzbd>
  ProxyPass http://127.0.0.1:8080
  ProxyPassReverse http://127.0.0.1:8080
</Location>

<Location /couchpotato>
  ProxyPass http://127.0.0.1:5053/couchpotato
  ProxyPassReverse http://127.0.0.1:5053/couchpotato
</Location>

<Location /transmission>
  ProxyPass http://127.0.0.1:9091/transmission
  ProxyPassReverse http://127.0.0.1:9091/transmission
</Location>

 

Install SSLH on your Synology DiskStation

9

sslhYou’re in an office or using public wifi and ports other than 53, 80 and 443 are blocked. How to SSH or VPN to your DiskStation? SSLH provides a solution for this, by acting as a proxy listening on port 443 and passing the traffic to deamons like SSHd, Apache or OpenVPN. The SSLH package is available in the SynoCommunity repository but manual work needs to be done to get it working.

By default, Apache on the Synology listens on port 443 without binding to an IP-address or interface. The first step would be to change the configuration so Apache listens on port 443 on localhost only. SSH to the DiskStation and change the configuration in these 3 files:

  • /etc/httpd/conf/extra/httpd-ssl.conf
  •  /etc/httpd/conf/extra/httpd-ssl.conf-sys
  •  /etc/httpd/conf/extra/httpd-ssl.conf-user

This can be done recursively with sed:

mkdir /root/http-backup
cp -a /etc/httpd/conf/extra/httpd-ssl.conf* /root/http-backup/
sed -i 's/*:443/127.0.0.1:443/g' /etc/httpd/conf/extra/httpd-ssl.conf*

Now change the configuration of SSLH. By default, de service listens on port 3000. The configuration file can be found in /usr/local/sslh/var/sslh.cfg. Also change your host (0.0.0.0) to the IP-address of the Synology. In case you use multiple interfaces, the interface to your router should be the one.

When done, reboot your Synology DiskStation and test if https, ssh and/or OpenVPN works via port 443.

Synology DS1815 from the inside

0

About every two years I upgrade my Synology NAS. This time, the DS713+ made place for a DS1815. Tough the DS713+ isn’t bad at all, in particular after a memory upgrade, a faster CPU was preferred for single threaded applications like all Python apps are. Also, I needed a minimum of 4 Gbyte memory but more was preferred since Docker is a new Synology Package and more disk shelfs would be nice. I ended up ordering the new DS1815.

Some pictures from the unit, in particular the memory slot.

DS1815-info

IMG_2393

IMG_2394

New Synology DS1513+

0

Synology-Synology-DS1513-5x-3.5-SATA-4x-GigabitToday, Synology announced a new NAS. The DS1513+. It’s the big brother of the DS713+ I’ve bought a while ago. This new NAS has 5 disk-bays. I see it’s already available for order in several shops. Compered to the smaller DS713+ I use in my VMware home lab, the writing speed is more than doubled. Where the DS713+ specs mention ~135 MB/sec writing speed, the DS1513+ specs mention ~350 MB/sec., of ourse, if using both gigabit links in a trunk.

The other good thing is that Synology now says the unit has upgradable memory. That’s good to know. What a discussions we had with the DS713+. Almost 50 people commented on the article I’ve wrote about this unit.

Let’s see if i buy this unit later on. No need for space as we speak…

Synology DS713+ from the inside

90

Okay, don’t give IT-guys toys when they have screwdrivers. Tonight I found some time to open my brand new Synology DS713+. Me, and some guys out there where curious about the 1 Gbyte memory in this DiskStation. The real question was if the memory was expandable.

Well, taking a look at the PCB I noticed that the memory wasn’t soldered. So that’s a good sign. I guess it’s a regular DDR3 SO-DIMM module. The Atom CPU used on these mainboards should be able to support up to 4 Gbyte. So let’s order some memory this week to see if it will recognise upgraded memory.

Synology DS713+ from the inside: expandable memory

Opening the box is quite simple: if you know how. Start with the two screws at the bottom on the backside. In my case labelled AL1 and TQ3. Then, remove the screw between the back USB ports and the back eSATA port. After this, you should be able to lift the backside and then remove the metal cover connecting the front and the back.

Replacing the SODIMM module requires some more screwing since one of the frame pieces is on top of the module so you can’t remove this. I didn’t spend time on this yet since I don’t have any modules in stock. Will be done when the 4Gbyte DDR3 SODIMM is delivered.

And yes, my other question was answered to. The Synology DS713+ does support VMware VAAI for ESXi5.1 Hardware acceleration shows up as supported within vCenter. But I didn’t spend enough time to do comparisons when cloning a virtual machine, etc.

Update: SODIMM module Kingston KVR1333D3S9/4G works fine.

Screen Shot 2013-01-17 at 20.34.35Update 28 January:
As you can see, the DS713+ will have benefit from more memory. These are the graphs collected with Observium for the last month. The gap shows the Syno turned of to upgrade. As you can see, memory utilisation is higher than before.

Screen Shot 2013-01-28 at 12.07.44

 

May the force be with me

0

SSD powered Synology FTW! More will follow!

Ordered a Synology DS713+

6

Okay, we don’t celebrate Thanksgiving here in the Netherlands. Neither do we have a Black Friday. So that wasn’t an excuse for me to buy a new Synology DS713+. But my old Synology DS211+ became quite slow. Slow enough for me to decide to offload SabNZBd, SickBeard and CouchPotato to my 27″ iMac. But I don’t like open ports on my workstation so time for a new Syno, which I’ve ordered today with my friends at mobile-harddisk.nl since they provide excellent service!

The new Syno will run a 240 GB  SSD and a 2 TB 7200 RPM harddisk, both with SATA3 interface. I hope the 2,5″ SSD will fit in the Syno without any brackets. And yes, I did choose not to use RAID in the current configuration. First let’s do some tests with HDD compared to SSD. Expansion can be done later on (Hello Christmas!) with the Synology DX513 expansion unit. Among the speed I’m very curios about the VMware VAAI support and the memory slot being used.

The Synology website does mention VMware VAAI support fot the DS713+. A bit strange since only the XS-serie NAS does provide this support. Let’s see when it’s in. The other interesting part is the memory slot. Does the DS713+ have 1 Gbyte soldered DDR3 memory or does it come in a normal memory slot. If the last one is the case it should be quite easy to replace the module with a larger one up to 4 Gbyte since the Intel Atom D2700 should support this.

Hope the packages will be delivered to the office tomorrow and I find some time to test drive.

Install Zabbix Agent on Synology

17

Since a few  months I use a Synology DS211 NAS device at home, to store my music, movies and back-ups. I also use Zabbix to monitor my servers, switches, etc. Since there is a Zabbix agent package for most Linux distributions, there was none for the Synology. But… Synology is Linux so let’s rock and compile them from source.

I assume that my readers are hard-core System Administrators who know how to enable SSH access and become root. The next thing to do is slipstream your Synology and install the ipkg package-manager. Now, install some build tools with the command:

DS> ipkg install gcc make bison flex gconv-modules

Let’s get the Zabbix source, in my case 1.9.3-beta, untar them and start compiling

DS> cd /root
DS> wget http://downloads.sourceforge.net/.../zabbix-1.9.3.tar.gz
DS> tar xzf zabbix-*
DS> cd zabbix-*
DS> ./configure --enable-agent --prefix=/opt/zabbix

The compiler starts running for a few minutes and shows this error:

(...)
checking for ICONV support... no
configure: error: Unable to find iconv.h "no"

Let’s see if the named file is on your system

DS> find / -name iconv.h
/volume1/@optware/include/iconv.h
/opt/include/iconv.h

The Zabbix configure script will look for the iconv.h file in /usr/include, not in /opt/include. Setting a symlink will fix this

DS> cd /usr/
DS> ln -s /opt/include/ include

Now start recompiling, you’ll see no more errors.

DS> cd /root/zabbix-*
DS> ./configure --enable-agent --prefix=/opt/zabbix
DS> make
DS> make install

Only thing left is creating configuration files and a init-script and a sample configuration file. Start Zabbix with from an SSH shell with “/opt/zabbix/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf &”

An sample /etc/zabbix/zabbix_agentd.conf:

PidFile=/tmp/zabbix_agentd.pid
LogFile=/opt/zabbix/agentd.log
Server=192.168.2.2 # Your Zabbix Server IP
Hostname=synology.domain.tld
Go to Top