When you enable file and printer sharing in Windows Vista it automatically opens the ports needed to share files or printer in the Windows Vista firewall for you.
What if you’re not using the Windows Vista firewall or you’re using a hardware firewall like a router, firewall appliance, Linux firewall, or a Cisco PIX?
Below is a table that lists all the ports that need to be opened in Windows Vista to share files and printers. You can manually open these ports to enable file and printer sharing on your computer.
Ports Used for File and Printer Sharing
|File and Printer Sharing (NB Name In)||137||UDP||Used for NetBIOS Name Resolution|
|File and Printer Sharing (NB Datagram In)||138||UDP||Used for enabling NetBIOS Datagram transmission and reception.|
|File and Printer Sharing (NB Session In)||139||TCP||Used for enabling NetBIOS session Service.|
|File and Printer Sharing (SMB In)||445||TCP||Used for enabling Server Message Block transmission and reception
via Named Pipes.