I have a server running OpenVPN, located in my "DMZ," which uses the 10.0.0.0/24 subnet.
The IP address for this server is, for instance, 10.0.0.7.
OpenVPN utilizes the 10.0.4.0 virtual subnet.
How can I create a virtual interface on OpenWrt to manage the firewall, allowing the 10.0.4.0 subnet to connect to the 10.0.0.0 subnet or the 10.0.1.0 subnet?
I'm not sure if I've fully understood your questions, let me try to rephrase it:
You have OpenWrt running as your main router with 10.0.0.0/24 subnet. Within this subnet, you have an OpenVPN server that uses the 10.0.4.0/24 subnet for its clients. Now you would like to give your clients from the 10.0.4.0 subnet access to the 10.0.0.0/24 subnet - right?
If that's the case, then you need to configure your server accordingly, not OpenWrt. You have several options, what comes to my mind:
Enable NAT on the server and masquerade the OpenVPN traffic as traffic from the server (usually a quick solution)
Enable routing on the server and on OpenWrt and avoid the masquerading
Use a VLAN to get the OpenVPN traffic as-is to an interface on OpenWrt and configure the routing/masquerading there
In all cases, you will have to configure your server to do the right thing. What OS is your server running?
If you OpenWrt device has enough power, is moving the OpenVPN instance to the OpenWrt router an option? That would ease a few things.
I'm afraid, you will have to figure out how to do this in Debian 11 since you need to bridge and/or route the OpenVPN traffice on the OpenVPN server - not on OpenWrt. Once you have the VLAN, we can help with the OpenWrt side.
Edit: The easiest solution we can help with is moving the OpenVPN server to OpenWrt!
It can definitely be done on Debian 11, I remember having done this many years ago on a Ubuntu machine. Basically, I configured Ubuntu to act as a NAT router for the VPN interface.