If you don't wanna cough up some serious dough, nothing beats linux firewall distro's.
Some of the most popular distro's worth mentioning are:
IPFire
IPCop
PFSense
With IPFire being my favourite
You have all the flexibility to do whatever your heart desires with it, you don't have to sit with features forced on you by the manufacturer bringing your systems overall performance down(no matter how small that difference is) and you're not paying for a closed source OS or paying more for their hardware even though it's inferior.
I am reminded of Apple again...
You can build your own system(hardware) and then get to building your software system. Once you're done with all the small little changes and bring it into production you can clone the system.
You can install it on a Raspberry Pi if your needs are small or you can go buy a 10 000USD server and install it on that. Same security either way, for the most part.
I have had Pen Testers test some of my setups to check for security holes, and so far no one has gotten any access to anything past my firewalls.
What everyone has to understand is that ALL of the firewalls worth mentioning : RouterOS, iOS(Cisco, not those damn people from Apple, although they are applicable here too), Juniper, Fortinet etc are ALL derived from Posix kernels(that's to say all of them are derived from linux flavours).
The ONLY difference is that, that company spent some time and man hours setting their's up the way they want it and of course the fact that they closed their source code.
Now that's all good and well if you're running an enterprise business and don't have time to tweak everything up to the point where your security is @ the same standard as say Fortinet or RouterOS, however if you can sacrifice some time to spend some dough then go for a Linux Firewall distro.