📜 ⬆️ ⬇️

How to set up a firewall on the server with Zimbra?

One of the main tools of a modern cybercriminal is a port scanner, thanks to which they find servers vulnerable to one or another vulnerability and then attack them. That is why one of the main rules for ensuring information security of a server is the proper configuration of a firewall. An optimally tuned network traffic filtering system is able to neutralize the lion’s share of cyber threats without using other information security solutions.

image

Zimbra makes extensive use of various network ports for both external and internal system connections. That is why the most optimal for it will be the creation of the so-called “White List” in the firewall rules. That is, the administrator first prohibits any connections to any ports on the server, and then opens only those that are necessary for the normal operation of the server. And it is at this stage that the Zimbra server administrator invariably faces the question of which ports should be opened and which ones should not be touched. Let's take a look at what ports and why Zimbra uses to make it easier for you to make a decision about building your own “white list” in the firewall.

For external connections, Zimbra can use up to 12 ports, including:
')

As already mentioned, in addition to external connections, the Zimbra Collaboration Suite also has a lot of internal connections that also occur on different ports. Therefore, when such ports are included in the “white list”, it is worth ensuring that only local users have the ability to connect to them.


Note that if, in the case when Zimbra runs only on one server, you can get by with a minimal set of open ports. But if in your enterprise Zimbra is installed on several servers, then you will have to open 14 ports with numbers 25, 80, 110, 143, 443, 465, 587, 993, 995, 3443, 5222, 5223, 7071, 9071 . Such a set of open ports for connection will ensure normal communication between servers. At the same time, the Zimbra administrator should always remember that, for example, an open port for accessing LDAP is a serious threat to the information security of an enterprise.

In Ubuntu, this can be done using the standard Uncomplicated Firewall utility. To do this, we first need to allow connections from the subnets to which the connection will occur. For example, let's allow connections to the server from the local network using the command:
ufw allow from 192.168.1.0/24
And then edit the /etc/ufw/applications.d/zimbra file with the rules for connecting to Zimbra to bring it to the following form:
[Zimbra]
title = Zimbra Collaboration Server
description = open source server for email, contacts, calendar, and more.
ports = 25,80,110,143,443,465,587,993,995,3443,5222,5223,7071,9071 / tcp
Then you need to execute three commands in order for the changes we make to take effect:
ufw allow Zimbra
ufw enable
ufw status
Thus, a simple setting of the “white list” in the firewall is able to reliably protect the correspondence stored on your mail server against most cybercriminals. However, you should not rely only on a firewall while ensuring information security of the mail server. In the event that attackers gain access to the internal network of your enterprise, or if one of the company's employees turns up to be a cybercriminal, restricting incoming connections is unlikely to help.

Upd. Particular attention should be paid to port 11211, on which memcached is running. It is he who is involved in the memcrashd, a popular variety of cyber attacks.

Detailed instructions on how to defend against this attack are available on the official website of the Zimbra Collaboration Suite .

Source: https://habr.com/ru/post/427729/


All Articles