And how can I do that?You can’t.
The only way is to perform nat from 8291 to your custom port.
How to change the query port from 8291 to another?Is there anything valuable in the device’s logs when dude is trying to connect?
Does winbox run on the default port?
Can you confirm with torch, that dude packets are reaching the device?
I already have a rule that accepts all the protocols and ports of the server dude networkCheck that your device’s firewall accept connections on default winbox port 8291 from the address of your dude server.