I have a set of mobile devices that are configured to send UDP messages to an IP-address that is set in their SRAM. They don't have the capability to either store a URL, or resolve a URL to an IP address. The traffic going to the destination IP that the devices are sending to must pass through a gateway router under my control. The gateway router is running OpenWRT linux. I would like to route these UDP packets to Amazon Elastic Load Balancing (a AWS service). One constraint of Elastic Load Balancing is that (as far as I have been able to determine) DNS must be used to resolve the IP of the load-balancer (because at any time there may be more than one loadbalancer in use by AWS, and the choice of which to use is set at the DNS under Amazons control). That's the long story.
The short story is "How can I direct UDP packets routed through an OpenWRT router towards an address resolved through DNS at that router?"
I'm looking for a solution through IP chains/tables, firewall rules etc (or at least "plugins" with some history) rather than custom generated code.
Thank you all in advance for your help!