Leaving ports open on your server is like leaving your windows unlocked. Attackers don’t need to guess much, they just scan and knock until something responds. That’s why port management is important. With BitNinja’s PortHoneypot module, you now get built-in port blocking and allowing. No extra firewall scripts, no extra tools, no hidden costs.
In this article, we’ll take a deep dive into how port blocking works in BitNinja, why it matters, and how you can configure it for maximum security without breaking your services.
The PortHoneypot module was originally designed to detect port scans and lure attackers into fake services. Technically, it doesn’t bind directly to your “real” service ports:
60500.This same architecture also makes port blocking/allowing possible, starting from BitNinja 3.12.8.
With the Port Blocker, you define rules in the module’s configuration:
*) and then only allow what’s explicitly listed.Example:
[portblocker]
blocked_ports[]='*'
allowed_ports[]=22
allowed_ports[]=80
allowed_ports[]=443
This configuration creates a default deny policy, every port is blocked except SSH, HTTP, and HTTPS.
To prevent accidents, some ports will always remain open, even if you set blocked_ports[]='*':
20, 21, 22, 53, 80, 443, 465, 587, 993, 995.If cPanel or Plesk is installed, their required ports are also auto-detected and excluded from blocking.
2222:2250 if you have services clustered there.ports_never_use and ports_always_use. These give you extra control over which ports can/can’t be honeypotted.startport to avoid overlap.Port blocking isn’t glamorous, but it’s one of the simplest and most effective layers of defense:
With BitNinja’s Customizable Port Blocking, you get the best of both worlds:
Don’t let unused ports be your weakest link. Close them with BitNinja.
Register now and start your 7-day free trial, no credit card required.
BitNinja gives you full access to all features, including port-level blocking, in every plan, no hidden fees.
Have questions or feedback? Feel free to reach out to us, we’re here to help.




