Look at this
Link above sets all in expert settings, but you can do all in magic dosbox game profile – you pick server or client, dont forget enable it.
It is easy. I think port must be on android 2000 and higher, less value is reserved for system. You must be connected to LAN, then you create server on first device, start game and check your ipadress in advanced settings (from general settings inside game). That ipadress you set on second device
This creates tunnel between two devices, but you must set yet the ipx in the game – server and client