Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.06 minutes in March 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.

[Zimbra]
title=Zimbra Collaboration Server
description=Open source server for email, contacts, calendar, and more.
ports=22,25,80,110,143,161,389,443,465,514,587,993,995,7071,8443,11211/tcp

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 127.0.0.1
zmprov ms zmhostname zimbraMemcachedClientServerList 127.0.0.1

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
public
target: default
icmp-block-inversion: no
interfaces:
sources:
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.]

 

Conclusion

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

PREVENT YOUR SERVER FROM CRASHING!

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.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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