Switch WAN when cellular interface reaches 10GB

Started by fctr, June 23, 2021, 12:35:53 AM

Previous topic - Next topic
Greetings!

I am rather new to OPNSense, but so far, I love it. I have a dilemma and I'm not sure how to solve it.

Hardware and stuff:

  • Protectli Appliance with 6 NICs (1-6)
  • OPNSense 21.1.7_1 (amd64/OpenSSL)
  • Cellular Appliance with ethernet interface

Connections:

  • NIC1 - LAN
  • NIC2 - WAN Cellular Appliance (Static IP)
  • NIC3 - WAN DSL (Different Static IP)
  • NIC4-6 - Unused

So here's what I need to happen:
OPNSense should use NIC2 for WAN until the byte count for NIC2 reaches 10GB, switch over to NIC3 for WAN until a certain day of the month (first day of the cell billing), then switch back to NIC2 for WAN.

I can program and script, so if I need to write something, I'll write something, but I certainly hope it's already done by someone. Heck, I'd even pay to have it done.

Comments? Suggestions?

Thanks,
-=> Andrew