----Overview of what I'm doing----
Streaming audio and video as UDP multicast to multiple receivers on my LAN
I want to forward those UDP packets to a remote computer with the least amount of delay possible.
----So here's my setup----
192.168.1.10 is sending UDP packets to 239.0.0.10:9998
All computers on the LAN see and watch those packets just fine
Remote computer at IP 1.2.3.4 also wants to receive those packets and they want to receive them on port 65432
----What the router should do----
Receive packets sent to 239.0.0.10:9998
Increase packet TTL to a good value (64 ?)
Change destination address:port from 239.0.0.10:9998 to 1.2.3.4:65432
Maybe change source address:port from 192.168.1.10:XYZAB to WAN IP 4.5.6.7:XYZAB, if that is really necessary ?
Can this be accomplished with a single firewall rule ?
Does NAT have to be used ?
I heard NAT is hardware accelerated, is that more efficient, does my router have hardware accelerated NAT (archer c7 v2) ?
Maybe describe firewall rules to do it with NAT but also without NAT, if that's possible ?
----What I've tried so far----
First thing I did was allow UDP packets to reach my router from both WAN and LAN
Using netcat, I tested my packets work both ways
Sending udp packet from openwrt router to remote internet host works
From internet host to openwrt router
Now for the LAN side UDP packets
Seen from a random LAN host
Those same packets seen from openwrt router
Now, time for the firewall rule to receive those packets and send them to the remote host !
First attempt at a rule
I've got tcpdump running on both sides
root@router:~# tcpdump -i eth0.2 udp port 8787
root@premium:~# tcpdump udp port 8787
But nothing is showing up, my rule is probably wrong
I suspect I need to use another action than accept
Something that will take these packets
Increase TTL to at least 32
Change destination IP to 1.2.3.4
Change destination port to 8787
Maybe change source IP to my WAN IP
Maybe change source Port to ... something, 8787 I guess ?
And send them out of the WAN port on eth0.2
This is really as far as I've ever
Google and chatgpt suggest using MANGLE or NAT ??
Does openwrt support mangle ?
For my purpose, and considering limited CPU power of my router, which should I use ?
Which will be more flexible for future use ?
DO NOT READ THIS PARAGRAPH BELOW BEFORE ANSWERING, IGNORE IGNORE IGNORE !!
(I have further complications that I have purposedly left out so that others in my situation can try this. My supplemental complications are that some of my internet remote hosts, will need me to establish UDP NAT hole punching, which I hope to be able to do with just netcat on both sides and the second complication is that my setup is GPON fiber internet, so I have my openwrt router plugged into shitty ISP router which cannot do bridge mode and is therefore in NAT DMZ mode urrrggg, but for now let's just focus on sending those packets out and receiving them on the internet host, which in the current case is a direct IP access from a regular VPS)