How to change SAMBA default port on centos?

24,026

Edit smb.conf and find a line like this,

smb ports = 445 139

change this default port to

smb ports = 2222 2000

Then restart samba server. Now samba server should be listening on the new ports that you have mentioned.

For more info on customizing samba server click here for documentation.

N.B. : Use port number above 1024 as these are reserved for system purpose.

Share:
24,026

Related videos on Youtube

Vinay Gupta
Author by

Vinay Gupta

Updated on September 18, 2022

Comments

  • Vinay Gupta
    Vinay Gupta over 1 year

    I need to change the port numbers of samba. Our ISP is blocking the ports 445 and 139. So I need to run samba in a different port.