Firewall needs more robust rules and rule processing

After creating a DO firewall, I am allowed to create rules and as part of this process, I have the option to allow all TCP, allow all UDP, or allow specific IP addresses or IP address ranges in both IPv4 or IPv6. And in many cases this is sufficient.

The issue I am having is SMTP DDOS or brute force attacks coming from specific IP address ranges in massive quantities. The current rule definition for the firewall does not provide the ability to specify the order in which the IP addresses or ranges are processed. It also does not allow for a “negated allow (or block) rule” where I can specify something like ! or ! to drop all packets originating from this range. This type of rule would allow me to specify the ranges of IP addresses I want to block BEFORE I get to my allow all TCP rule that allows my mobile phone to send into my SMTP server no matter the IP address the phone has.

I have to believe that other customers are experiencing similar needs and may not have expressed them.


Need other tags such as email, smtp, DDOS attack, SPAM

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You might have more luck setting up something like fail2ban or sshguard so that the failed attempts trigger a local firewall change, that way you won’t have to manually adjust the rules when the attackers switch IP.