I am thinking of building a router for OPNsense. I am familiar with building computers but I am not familiar with networking. What kind of hardware would I need to hit 1, 2.5 (my most likely target), 5 or 10 gigabit speeds on my local network?
I was thinking of buying a small form factor PC and sticking an Intel I226 Network Card or something similiar in it.
Depends on what features you want to enable and how many devices are using the network but a relatively recent quad core above 2ghz is probably plenty. If you want to do packet inspection or such, more Is probably better but you're not going to need a 32 core or anything. Is there a specific reason you want a 5gb local network, or just want the fastest network you can afford?
Consider buying dedicated firewall hardware - check out "DEC677 – OPNsense Desktop Security Appliance". I don't have experience with opnsense hardware but I use similar for a different os. The idea is that you won't run into compatibility issues since opnsense will test all updates on their own hardware before releasing them and should be optimised, etc.
Well…yes, but you only but once in about 5-7 years I guess (maybe your device lasts even langer).
So - either you go with opnsense hardware or get a protectli I’d recommend. No love for cheap Chinese computers from my side here, you may want to be quite sure to have reliable hardware as your main firewall (if you do not want to cluster?).