How can I change port number used by rsync server ?

Rsync server uses port 873 by default. You can add port directive to the configuration file rsyncd.conf to specify an alternative port.

 

port new-port-number

 

Don't forget to restart the service.