Archive for July, 2015

Vesta–Changing default DNS SOA settings

July 17, 2015 2 comments

vi $VESTA/func/

search for SOA



Change to values that you want, typically it is

3600, //refres

1800, //retry

604800, //expire

600 //ttl

Categories: Vesta

Enabling SSL for Vesta VSFTPD

July 15, 2015 Leave a comment
  1. Copy the certificate files to /etc/ssl/certs
  2. Edit the VSFTPD config: vi /etc/vsftpd/vsftpd.conf
  3. rsa_cert_file=/etc/ssl/certs/certificate.crt
    force_local_data_ssl=NO #set this to yes to force SSL
    force_local_logins_ssl=NO #set this to yes to force SSL
  4. service vsftpd restart

Then in order to test, run FileZilla with the following connection settings


Once connected, look at the log and confirm that TLS/SSL connection is established



Categories: Vesta

Updating the Vesta Control SSL Certificate

July 14, 2015 Leave a comment

The Vesta Control Panel SSL certificates is contained in the following 2 files

  1. /usr/local/vesta/ssl/certificate.key and
  2. /usr/local/vesta/ssl/certificate.crt

One easy way to generate SSL certs for Vesta, is to goto and fill in the blanks, after which it will generate the necessary openssl command to run to generate the CSR as well as the key file



Once you send this CSR to digicert and complete the validation process, you can then download the pem file from digicert


Now replace the .key file with that generated by openssl and the crt file with the contents from the downloaded PEM file

and finally issue the following command to restart vesta

service vesta restart

Categories: Digicert, Vesta

Creating a Master, Slave, Slave Nameserver setup using Vesta Control Panel

July 14, 2015 5 comments

You can easily setup a master, slave DNS using Vesta CP with a single command line found at

However should you bring this to the next level and use it for your “enterprise” web hosting, there are a few things you need to do


You might be tempted to setup Vesta in the following way, where all the webhosts will sync to NS01 and then have NS01 sync the dns config over to NS02.


Unfortunately Vesta does not allow you to do this, BUT it does allow the setup as shown below, where each of the web servers will send the dns updates to each of the named servers.



Setting up the NameServers (NS01, NS02)

Now given that Vesta will install and setup different components depending on the amount of ram of the machine, for NS01 and NS02, it would be wise to go with 512MB ram so that it will install the bare minimum.

Once you have installed Vesta on the servers, its time for some clean up

  1. Delete the unused packages
  2. cd $VESTA/bin
    ./v-delete-user-package palegreen
    ./v-delete-user-package gainsboro
    ./v-delete-user-package slategrey

  3. Create the dns-cluster user, who will own all the domains that was synchronized over

    ./v-add-user dns-cluster [password] [email] default [firstname] [lastname]

  4. Stop all the unnecessary services

    ./v-stop-service httpd
    ./v-stop-service nginx
    ./v-stop-service exim
    ./v-stop-service dovecot
    ./v-stop-service vsftpd

  5. Login to Vesta using your web browser, and disable the necessary services at the Firewall section
    1. Accepted services: SSH, DNS, Vesta, Ping
    2. Blocked services: Web, FTP, SMTP, POP3, IMAP, DB

Setting up the Master > Slave DNS (Web01, Web02 > NS01, NS02)

Remember that Vesta allows you to add an unlimited number of slave DNS for each master server

So for web01, and web02, run the following commands:

cd $VESTA/bin
./v-add-remote-dns-host ns01 8083 admin [ns01 admin password]
./v-add-remote-dns-host ns02 8083 admin [ns02 admin password]


You can verify that this is done by doing to server setup and ensuring that DNS is set to cluster and confirm that the following cron job exists



Testing the setup

Now goto web01 and/or web02 and create a few domains, on ANY accounts and at for the 6th minute of the hour, goto ns01 and ns02 to confirm that the changes are synchronized


Now what about URGENT cases

If there are cases where you urgently need to sync over, you can run this command on all of your web servers for each named server that you have: v-sync-dns-cluster [target host]

v-sync-dns-cluster ns01
v-sync-dns-cluster ns02

Categories: HyperV, Vesta

Installing CentOS 6.6 on HyperV 2012R2

July 11, 2015 Leave a comment
  • Download CentOS ISO file: You can download the latest version of CentOS at
  • Setup a HyperV VM for CentOS
    • At least 1 CPU
    • The amount of RAM will affect the installation GUI, VM with too little RAM will be reduced to a DOS like setup guide, whereas those with higher RAM will get a nice fancy GUI
    • No need for legacy network drivers, you can use the new 10GB network adapters normally used by HyperV
    • A minimum of 20GB HDD
    • Follow the guides and screen caps below if you need a detailed step by step guide
  • Once the OS is installed successfully, reboot
  • Login using the root account that was created during the installation
  • Issue the following 2 commands (these 2 commands are very important, failure to do this can result in unexplained hanging of the VM) 

    yum -y install hyperv-daemons
    yum -y update

  • If you wish for your installation to auto check for updates every night, issue the following commands

    #install yum cron job
    yum -y install yum-cron

    #enable nightly update
    /etc/init.d/yum-cron start

    #Enable at boot time
    chkconfig yum-cron on

Congrats, you now have a working CentOS in HyperV that auto updates itself every night to always be on the safe side of security 🙂

Setup in a Low Ram Environment

If you are running in a low ram environment, CentOS will not load the GUI setup environment, and you have to content with DOS based screens.

  1. Typically I would skip the media test since this is from an ISO file, if you are doing this off a DVD, might be wise to check, but be prepared to wait
  2. Then you will be prompted to setup a root password
  3. Once done, its now time to setup the disk. For convenience, I usually go for replacing the entire drive (its empty anyway)
  4. Simple matter of clicking write changes to disk to commit those changes
  5. Sit back and wait for installation to complete


Setup in a High Ram Environment

  1. Things look different if you have enough RAM, you get treated to a nice GUI
  2. Start by choosing your country and language
  3. You will then need to format the disk attached to the VM
  4. There after, setup the hostname
  5. As well as the networking details
  6. Then its onto the date/time settings
  7. And the root password
  8. Disk layout
  9. Confirmation of disk layout
  10. Type of installation, if you are going to install Vesta Control Panel, choose minimal
  11. Now sit back and wait for the installation to complete
Categories: HyperV