The following is only for DirectAdmin and CentOS 7.x (haven't tested on CentOS 6.x or 8.x yet)
You can install CSF (Config Server Firewall) the very well known from cPanel servers on your DirectAdmin Server also!
The steps are quite easy since DA made this possible!
That's all... your CSF is already installed! You may proceed and configure your firewall now!