I’ve got a project to look at building a open-source firewall. Along the way I encountered VyOS which seems to already do much of what I was planning any have been evaluating it. I’ve run into an issue with config size that I’m guessing some of you have hit before, and I’d like to know if this is just a known issue or if perhaps there’s a better way of doing this than what I’ve tried so far.
I started off with 10,000 rules per zone and 20 zones. I found no workable way of loading that via set commands, the merge command, etc. Scaled down to 1,000 rules per zone and 20 zones. Still had no success. Then I scaled down to 200 rules per zone and 20 zones (so 4,000 rules). This I managed to get loaded via the merge command, but it took much longer than I would have liked - but possibly livable. I did discover though that the config appears to be broke out into directories and files on a ram drive as part of the loading process. While innovative, and likely pretty flexible, I’m guessing this is also a real performance issue and may explain the performance I’ve been looking at. (I know NFT has much better performance than this when loading things directly)
I saved the config, rebooted, and (keep in mind this is a VM) it took around 15 minutes or so to reboot - a pretty clear indicator that config size impacts boot times. That’s a long time to wait on a reboot from a VM. Worse, if scale should grow beyond 200 rules per zone, or there are more zones, I might get into a situation with much worse times - could be a real problem if needing to reboot or restore in some fashion. Is there a better way of doing this?
If there’s not a better way of doing this, given the rules are all based around the firewall features and the rest of the config is likely to be small, does anyone have tips on how I might go about leveraging VyOS for the non-firewall parts and then just load NFT itself on the backside without interfering with VyOS or having one of the two run over the other?