Hi, this should be possible with packet marking (firewall/iptables) and advanced routing rules (ip rule/ip route combination). Basic idea would be to mark packet in the prerouting chain (mangle table) with a custom mark and then force that packet to get routed via a different path (routing table) if mark is matched. I tested this on a generic Linux machine, but it should work all the same on Teltonika router.
<firewall part here>
1. Apply custom firewall rule in firewall settings (@firewall > custom rules). This step might be possible via traffic rules, but it was much easier to do via CLI:
iptables -t mangle -I PREROUTING -4 -d 1.2.3.4/32 -p tcp --dport 443 -j MARK --set-mark 0xABCD
Change destination host to whatever you desire. It'd be recommended to try and stick with specific destination hosts however.
Change TCP port to whichever destination port may be used for communication.
Mark can remain the same, no need to change it.
<routing part here @advanced static routing section>
2. Create new routing table with an ID of 50 (just an example). Configure static route for your host via your preferred egress interface (outgoing interface/host/netmask). This will be the interface that you might want to use exclusively for OCPP communication.
You can add a default route here as well instead of specific target host, if you don't know which host you'll be reaching. Firewall marks and ip rule will control where packets will get routed.
3. Create routing rule with some arbitrary priority value, specify firewall mark that was entered in iptables rule and choose newly added routing table. You can also add destination subnet here if you want, but it isn't necessary, because ip rule will be matching marked packets anyway.
You can go even further and deny all outbound non-marked communication towards OCPP host via default routing table by using either prohibit/throw/blackhole static route rules or firewall rules, but this might not be needed, because all of the relevant packets will be marked and forwarded using specific routing table regardless.
If you run into some difficulties here please let me know, we should be able to get this PoC working, because the idea is pretty cool :)