22.9 C

Zimbra Firewall Configuration with ufw for Ubuntu

Previously we had cover the Installation of Zimbra Collaboration on Ubuntu 18.04. Today, we will go through the Firewall configuration with ufw for Ubuntu 18.04.

Installing UFW on Ubuntu

Install the UFW on Ubuntu by executing the command as

sudo apt-get update && sudo apt-get -y install ufw

Configure Zimbra Firewall usign UFW

Because of recent Memcache amplification attacks for UDP ports, we won’t enable udp port as it will cause serious problems. Due to this reason we will use only tcp ports which is protected from these.

- Advertisement -

Because we need an application profile for UFW, so let’s create this profile as:

sudo nano /etc/ufw/application.d/zimbra

Then add the following lines

title=Zimbra Collaboration Server
description=Open source server for email, contacts, calendar, and more.

After that enable app profile on ufw

sudo ufw allow Zimbra
sudo ufw enable

Then add ssh port as

sudo ufw allow ssh

To make any changes to the Zimbra profile, update it using:

$ sudo ufw app update Zimbra
Rules updated for profile 'Zimbra'
Skipped reloading firewall

Because for a single server installation, Memcache is not used outside the local server, consider binding it to the loopback ip address. So, use the commands:

sudo su - zimbra
zmprov ms zmhostname zimbraMemcachedBindAddress
zmprov ms zmhostname zimbraMemcachedClientServerList

Then restart Memcache services.

sudo su - zimbra -c "zmmemcachedctl restart"

Restricting Access to Admin dashboard

As it is a good practice to always restrict access to port 7071 to a trusted network or IP, so do it by typing:

$ sudo ufw allow from to any port 7071
$ sudo ufw allow from to any port 7071

So, this is how you can configure your Zimbra Server with firewall using ufw on Ubuntu 18.04 LTS.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


Please enter your comment!
Please enter your name here

Latest article