Port 25 Closed After Stopping BitNinja Agent

You are here:
Estimated reading time: 1 min

Overview

Some customers have reported that port 25 (SMTP) becomes blocked after stopping the BitNinja agent.
This behavior should not occur in recent versions (≥ 3.12.1). However, servers that previously ran older BitNinja versions may still encounter this issue.

This guide explains why it happens and how to resolve it.

Why Port 25 Can Be Closed

In older BitNinja versions, the agent automatically inserted the following ports into CSF’s tcp:in,out allowed list while running:

25,60110,60201,60210,60211:60250,60300,60301,60412,60413,60414,60415,60416,60417,60418

When the BitNinja agent stopped, these ports were also removed from CSF’s allowed list, even though they were allowed previously.

This meant that port 25 could be closed, blocking outbound or inbound mail traffic.

Change in Behavior (Since 3.12.1)

Starting from BitNinja 3.12.1, this behavior was corrected.

Now, the BitNinja agent:

Checks if port 25 is open when starting.

Leaves the port as it is after stopping; no longer force-removing it.

If your server had older versions installed before upgrading, BitNinja has no way to know whether port 25 was originally allowed in CSF because during the update, a BitNinja agent restart also happens, and the previously added ports (including 25) are removed.

How to Fix It

Stop BitNinja agent with the command: service bitninja stop
Manually re-add port 25 to CSF allowed ports.
Edit the CSF config:
nano /etc/csf/csf.conf
Add 25 to both TCP_IN and TCP_OUT as needed
Reload CSF: csf -r
Restart BitNinja agent: service bitninja start

Was this article helpful?
It was not helpful
Views: 8