Security Best Practices
Security Best Practices
Let’s Encrypt is a new Certificate Authority: It’s free, automated, and open.
We will use Let’s Encrypt to create and renew the signed certificate.
Zimbra will use this Certificate for any kind of connection “ Web Mail and Mail Client “.
Using Signed Certificate will help to send an encrypted message from Zimbra.
2- Configuring SSL Certificate:
Stop Nginx Proxy service and Mailboxd
# zmproxyctl stop
# zmmailboxdctl stop
Install GIT and Let's Encrypt Project
# yum install git -y
# git clone https://github.com/letsencrypt/letsencrypt
# cd letsencrypt
Create SSL Certificate
# ./letsencrypt-auto certonly --standalone -d mail.linuxdirection.com
Build the CA and RootCA , To Create it we must to use the IdenTrust root Certificate and chain.pem has
to be concatenated with the root CA. First the chain and the end of the file the root CA from this URL
https://www.identrust.com/certificates/trustid/root-download-x3.html
2- Configuring SSL Certificate:
Integrate the CA with Zimbra
# mkdir /opt/zimbra/ssl/letsencrypt
Copy all the Let's Encrypt folder
# cp /etc/letsencrypt/live/mail.linuxdirection.com/* /opt/zimbra/ssl/letsencrypt/
# chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/*
verify the Certificate
# /opt/zimbra/bin/zmcertmgr verifycrt comm privkey.pem cert.pem chain.pem
Before the Deployment , Copy we need to backup the built in Zimbra Certificate
# cp -a /opt/zimbra/ssl/zimbra /mnt
Move the privkey.pem under the Zimbra SSL commercial path
# cp /opt/zimbra/ssl/letsencrypt/privkey.pem
/opt/zimbra/ssl/zimbra/commercial/commercial.key
The Deployment
# /opt/zimbra/bin/zmcertmgr deploycrt comm cert.pem chain.pem
# su - zimbra -c "zmcontrol restart"
3-Firewall Rules and Fail2ban:
We are using Zimbra 8.6 installed on CentOS 7 so we will use iptables to control all ports of
Zimbra
Highly Recommended to just open the needed ports and not any other ports
We will need to open the ports of these services “ DNS , HTTPS , IMAPS , SMTP “ and
7071 , 8443 “ for Web Admin and Admin Management Interface.
And Whitelist the IP Address of Scrollout Server
We will use the this command :
# iptables -A INPUT -p tcp --dport 7071 --dport 8443 --dport 443 –j ACCEPT
# iptables -A INPUT –s SCROLLOUT_IP –j ACCEPT
# iptables -A INPUT –d SCROLLOUT_IP –j ACCEPT
To Verify :
# iptables -L
3-Firewall Rules and Fail2ban: