port change rule help

Hi, i have a problem with device which i want to use ftp. The problem is that the device is unable to work in different port than 21, but my ftp server is on port 1234 behind mikrotik. Can i change the port with some nat rule to make it work somehow without actually changing the port on my server behind the router?

Okay so you are trying to reach a server behind a mikrotik router that is using port 1234.
You have a device - where is this device?
a. behind the same Mikrotik router?
b. on the same subnet?
c. on a different subnet?

Its very easy to accept an incoming request to the router from an external WANIP looking to connect to port 21 (your device) and then translate that to the port of your server 1234.

assuming dynamic WANIP
action=dst-nat chain=dstnat in-interface-list=wan dst-port=21 protocol=tcp to-addresses=IPofserver to-ports=21

assuming static fixed WANIP:
action=dst-nat chain=dstnat dst-port=21 dst-address=WANIP protocol=tcp to-addresses=IPofserver to-ports=21

Its in remote location , also behind mikrotik. My question is can i pretend that the connection from this specific location to appear its on port 21 instead of 1234 without actually changing the port

Yes as described above, you send the packet as per normal
my.ftpserver.com:21

At the mikrotik you put in the dst nat rule that translates 21 to 1234, done…