Ray: Experimental

My Visitor

Like this site!

Wanna help other found this site? +1 us now!

Google +1 Button Privacy Policy

Synology Tags

My WebHost

I recommend hostgator, here is why.

Synology usage series 20 - Using your own domain name with freedns.afraid.org

This guide is about how to use your own domain name with your Synology NAS, using free dynamic DNS services.

Own domain name means Top level Domain (TLD) like [your own name].com you get from a paid registrar, not those secondary level domain you received from free provider like ray.dyndns.org/ray.no-ip.com/ray.co.cc.

In addition, this article also described how to setup Google Apps for your domain name as well.

Step 1 – Firstly, you need to register your own domain name if you do not already have one

Step 2 – We need a DNS hosting company which support dynamic IP update. For paid service, you can pick something like dyndns or no-ip. For free services, I’m using afraid.org which is as good as paid services. Create an account from afraid.org

Step 3 – Once we created a DNS hosting account, modify the name server of the domain name. We would like to let the DNS provider hosting our DNS records instead of using the name servers provided by registrar. (because most registrar do not allow dynamic IP update)

Below is godaddy example about how to change name server for your domain name.

  1. Login godaddy at www.godaddy.com

    Godaddy: Login from homepage

    Godaddy: Login from homepage

  2. Click ‘Domain Manager‘ from the navigation menu.

    Godaddy: Navigation Menu

    Godaddy: Navigation Menu

  3. In Domain Manager page, click the domain name you wanna change
  4. Once a domain name is clicked, click ‘Nameservers‘ icon. A popup window inside the page will appear.

    Godaddy: domain manager navigation bar

    Godaddy: domain manager navigation bar

  5. Select ‘I host my domains with another provider.‘, and input the name servers of the DDNS providers.

    Godday: Setup nameservers for domain name

    Godday: Setup nameservers for domain name

    For afraid.org

    - ns1.afraid.org
    - ns2.afraid.org
    - ns3.afraid.org
    - ns4.afraid.org

Procedures from other registrar is different from godaddy, but should be similar.

Synology usage series 18: Install sudo to secure the Diskstation

I need to ssh to my NAS from remote location to perform administration.

Due to the reason of the ‘su’ command provided by Synology is restricted by root only… so it is required to login as root in order to perform administration.

However, it is not a good security practice to allow login directly as root. To overcome this, we can install sudo from ipkg.

Continue reading Synology usage series 18: Install sudo to secure the Diskstation

Synology usage series 17: Install WebDav with Lighttpd

Update Note: WebDav is officially support since Firmware 3.0. This article is useful for user who still sticking with firmware 2.x.

The benefit of WebDAV is that you can securely mount a folder of your diskstation from any machine with http/https access to the internet, without the need of installing and downloading any client software. All the works were handled by the web server and the webdav plugin. It is good for simple and quick file exchange. I know that some NAS already support WebDAV by default, Syno really should add WebDAV support by default… asap…

Continue reading Synology usage series 17: Install WebDav with Lighttpd

Synology DS207+ usage series 15 - Send me email alert ONLY when external IP is changed

In the setup of series 13, I receive too many email telling my IP address of both diskstations. I think I should receive email alert ONLY when public IP address is changed.

The simple script I written here is running non-stop for a year, it is working just fine on my DS

So I wrote another bash script and have it run on my diskstations. Since it generate email only when IP address is changed, I can have the diskstations run the script like every 15 minutes.

Noted: the script need wget, bash and nail to work.

You need to edit /etc/crontab and restart cron daemon in order to have Diskstation to execute the scripts periodically.

Following /etc/crontab executes the script per 15 minutes.

*/15      *       *       *       *       root    /bin/sh /opt/bin/checkip.sh

To restart cron daemon:

DiskStation> /usr/syno/etc/rc.d/S04crond.sh stop
DiskStation> /usr/syno/etc/rc.d/S04crond.sh start

Update Jul 26 2009

After over 12 hours testing, the script is working and I’m receiving email alert only when IP is changed now. :)

The script is in page 2.

Synology DS101j usage series 14: Setup Postfix SMTP server with gmail relay

Install Postfix on DS101j

* many tutorial I found from the web told me create client certificate in order to use gmail as relay. But the fact is that client certificate is NOT a must in order to talk to gmail SMTP. I just want the installation as simple as possible because all I need is to send out some alert email and some snapshot from the IP cam.

1. Login to the admin console. Create a user ‘mail’ and a group ‘mail’.

2. Telnet/SSH as root. Install postfix using ipkg. (uninstall xmail first if it is already existed)

# ipkg remove xmail
# ipkg install postfix -force-depends

Make sure cyrus-sasl and cyrus-sasl-libs are installed as well, if not..)

# ipkg install cyrus-sasl
# ipkg install cyrus-sasl-libs

Continue reading Synology usage series 14: Setup Postfix SMTP server with gmail relay

Synology DS207+ usage series 13 - Send me my public IP address to my gmail account

This article is depreciated. Please refer to usage series 15 for better solution.

Thank you dyndns for keep deleting/banning my free ddns account for whatever reason.

I decided to have both of my NAS telling me their pubic IP address. And so I written the script below and have crontab execute the script twice [...]

Synology DS207+ usage series 12 - Send email alert when someone login to shell

Since the box is not as secure as I would expect, it would be very useful to receive an email alert when someone login to my box via telnet/SSH.

The instruction are from SynologyWiki, you could refer to the original article for details explanation regarding the steps below.

Pre-requisites

1. The box should be [...]

Synology DS207+ usage series 11 - Setup nail to send email from CLI (using gmail smtp)

In order to send email from CLI, I setup nail as below:

1. ipkg install nail 2. edit /opt/etc/nail.rc, add following lines to the end of the file

set smtp=smtp.gmail.com:587 set smtp-use-starttls set smtp-auth-user=[username]@gmail.com set ssl-verify=ignore set smtp-auth-password=[password]

3. sending mail from cli:

# echo “email body” | /opt/bin/nail -s “subject” [destination]@whatever92389.com

UPDATE Jul [...]

Synology DS207+ usage series 10 - Truncate and backup Openvpn log file

My OpenVPN server crashed everyday :’(. I have no idea why it crashed, I tried to read the log but I figured out that the log grown to 2GB whenever it crahsed XX( The log files is just too hugh to inspect.

I guess the root cause is the file size of the log file crashed the server. Luckily I have enabled incoming SSH access to fix this remotely.

So I just wrote couple lines in a shell script and made a scheduled job to truncate and backup the log file to prevent further issue.

Update Aug 4 2009

Yes it is indeed the root cause crashing the OpenVPN server. The script here works and prevent the VPN server crash again.

Continue reading Synology usage series 10 – Truncate and backup Openvpn log file

Synology DS207+ usage series 9 - Setup OpenLDAP on DS207+

Setup OpenLDAP is easy, the only thing that took time for new user like me is to create a syntax-error-free ldif file that could be able to import to the system :-/

Pre-requisites:

  1. The diskstation is already bootstrapped.
  2. Telnet or SSH is enabled

Click the link below for the procedures that I took to setup and configuration OpenLDAP on DS207+/DS101j

* Also tested on DS101j

Continue reading Synology usage series 9 – Setup OpenLDAP on DS207+