Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Zimbra firewall configuration with UFW and firewalld – How we do it

by | Dec 5, 2020

Are you looking for steps for Zimbra firewall configuration with UFW and firewalld? Take a peek at this blog.

Here at Bobcares, we have seen several such Zimbra related queries as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at the restoration process of the Zimbra LDAP database from backup.


Installing UFW on Ubuntu and CentOS

Before we get into the configuration of the Zimbra firewall, let’s first install UFW and Firewalld.

In order to install UFW on Ubuntu, we run the below command.

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

Then for CentOS, the UFW package is available on EPEL repositories. So we run the below commands.

sudo yum -y install epel-release
sudo yum makecache fast
sudo yum -y install ufw


Installing Firewalld on CentOS 7.x

If CentOS doesn’t have Firewalld already then we can install it using the below commands.

sudo makecache fast
sudo yum -y install firewalld

Next, we start and enable the firewalld service.

sudo systemctl start firewalld
sudo systemctl enable firewalld

For Debian, we run the below commands.

sudo apt update
sudo apt -y install firewalld


Zimbra Firewall configuration using UFW

Now let’s take a deep look at how our Support Engineers configure Zimbra firewalld.

zimbra firewall configuration with ufw and firewalld

For UFW, we shall create an application profile for UFW called Zimbra as given below:

sudo vim /etc/ufw/applications.d/zimbra

Next, we add the following content.

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

Then we enable app profile on ufw

sudo ufw allow Zimbra
sudo ufw enable

Also, we add ssh port by running the below command.

sudo ufw allow ssh

In case, if we wish to make any Zimbra profile then we update it using the command.

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

For a single server installation, Memcache is not used outside the local server. We consider binding it to the loopback IP address by running the below commands.

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

Then we restart the Memcached service.

sudo su – zimbra -c “zmmemcachedctl restart”


Zimbra Firewall configuration using Firewalld

First, we confirm if firewalld is in a running state or not.

sudo firewall-cmd –state running

If not, then we start it by executing the below command.

sudo systemctl start firewalld

After that, we configure Zimbra ports and services on the firewall.

sudo firewall-cmd –add-service={http,https,smtp,smtps,imap,imaps,pop3,pop3s} –permanent
sudo firewall-cmd –add-port 7071/tcp –permanent
sudo firewall-cmd -add-port 8443/tcp –permanent

Now, we reload the firewalld configurations by running the below command.

sudo firewall-cmd –reload

Then we confirm the runtime settings.

$ sudo firewall-cmd –list-all
target: default
icmp-block-inversion: no
services: dhcpv6-client http https imap imaps pop3 pop3s smtp smtps snmp ssh
ports: 7071/tcp 8443/tcp

[Need any further assistance with Zimbra related queries? – We are here to help you.]



In today’s writeup, we saw how our Support Engineers configure Zimbra firewalls with UFW and firewalld.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.