Circumventing Local Subnet Control Restrictions with Iptables

I have three wireless speakers that, for security reasons, only permit local subnet control. My network is setup such that the wired and wireless devices are on separate subnets, so right now the speakers cannot be used from the wired clients. I can setup a Ubuntu 18.04 virtual machine with interfaces in both subnets, but am not familiar enough with iptables to configure the forwarding correctly.

The speakers have IP addresses 192.168.100.200, 192.168.100.201, and 192.168.100.202. The wired clients exist in the 192.168.50.0/24 subnet. Each speaker needs to have two ports (8000, 9000) reflected. My reflection virtual machine has interfaces in both subnets, 192.168.100.250 and 192.168.50.250. What is the correct iptables setup to do the following:

192.168.50.250:8000 -> 192.168.100.200:8000 via 192.168.100.250
192.168.50.250:8001 -> 192.168.100.201:8000 via 192.168.100.250
192.168.50.250:8002 -> 192.168.100.202:8000 via 192.168.100.250
192.168.50.250:9000 -> 192.168.100.200:9000 via 192.168.100.250
192.168.50.250:9001 -> 192.168.100.201:9000 via 192.168.100.250
192.168.50.250:9002 -> 192.168.100.202:9000 via 192.168.100.250

Does this setup make sense? Short of changing out the speakers for ones that are more compatible with my network setup, is there an easier way to do this that I did not think of?

Thanks!

Go to Source
Author: user986713