Configuring ddclient to update your dynamic DNS at

Posted on Tue 02 September 2014 in HowTo • Tagged with howto, linux, dns is one of the few dynamic DNS free services that are reliable to use. If you have, like in my situation, a RaspberryPi connected to your home DSL and you want it to be always reachable without knowing the current IP address (the IP could change if you have a normal DSL service at home), you need a dynamic DNS service.

To update the one you just need ddclient a tool that is available in Raspbian/Debian repository. You can install it with this command:

sudo apt-get install ddclient

then you just need to edit /etc/ddclient.conf

use=web,, web-skip='IP Address'

and restart the client:

sudo /etc/init.d/ddclient restart

That's all! Please remember that free accounts have a limitation: they need to be confirmed every 30 days (you will receive an email and you need to click on the link contained to update your DNS).

Getting started with Digital Ocean VPS: configuring DNS and Postfix for email forwarding

Posted on Sun 31 August 2014 in HowTo • Tagged with dns, postfix, vps, howto, digitalocean, email

I have recently migrated my website from a shared hosting to a dedicated VPS on Digital Ocean. Having a VPS surely gives you unlimited possibilities, compared to a shared hosting, but of course you have to manage some services by yourself.

In my case I only needed: SSH access, LEMP configuration (Nginx + MySQL + PHP) to serve my WordPress blog and Postfix to use email forwarding from my aliases to my personal email.

Configuring DNS on Digital Ocean

Understanding how to properly configure the DNS entries in the panel could be a bit tricky if it's not your daily bread. In particular there is a Digital Ocean configuration that assumes certain things about your droplet, so it's better to configure it properly.

For example the droplet name should not be casual, but it should match your domain name: I initially called my host "andreagrandi" and I had to rename it to "" to have the proper PTR values.

You will need to create at least a "mail" record, pointing to your IP and an "MX" record pointing to (please note the dot at the end of the domain name). Here is the configuration of my own droplet (you will notice also a CNAME record. You need it if you want to correctly point to your ip.


Configuring Postfix

In my case I only needed some aliases that I use to forward emails to my GMail account, so the configuration is quite easy. First you need to install Postfix:

sudo apt-get install postfix

Then you need to edit /etc/postfix/ customizing myhostname with your domain name and add virtual_alias_maps and virtual_alias_domains parameters. Please also check that mynetworks is configured exactly as I did, or you will make your mail server vulnerable to spam bots. You can see my complete configuration here:

Add your email aliases

Edit /etc/postfix/virtual file and add your aliases, one per line, like in this example:

At this point update the alias map and reload Postfix configuration:

sudo postmap /etc/postfix/virtual
sudo /etc/init.d/postfix reload


As you can see, configuring Postfix is quite easy, you just need to be careful when you configure the DNS records in the control panel. Are you curious to try how Digital Ocean VPS works? Fancy 10\$ credit (enough for 2 months if you choose the basic droplet) for free? Use this link and enjoy it