Oh I see, no, that won't work. The gateway knows the devices it manages because it's the DHCP server for them on the .4.* address range. It keeps a table of device UDNs and their local IPs when they join and check in so it routes using that. AM keeps a table of UDN to IP (location) so it can find devices, but it sends HTTP messages from rules out raw.
There's a beta version of a new MPP version on my site that uses MQTT to communicate though I haven't implemented all of the devices yet and there's no automatic update function for firmware levels. And you'd need an MQTT broker, I've implemented a rudimentary one (no security) that runs on an ESP32.