Configure Windows Firewall settings for File and Printer Sharing with Windows XP

Summary

The Windows Firewall blocks file and printer sharing by default. You can go into the Windows Firewall, click the Exceptions tab and enable file and printer sharing or use the NetShell Utility (netsh) command. In Windows XP prior to SP2, you had to manually open UDP 137, 138, TCP 139, and 445 ports for file and printer sharing. The Windows Firewall for computers running Windows XP Service Pack 2 (SP2) makes it easier to configure file and printer sharing.

More Information

Method 1: Use the Windows Firewall

  1. Click Start, point to All Programs, then Accessories, then Communications then Network Connections. (Or you can right click My Network Places on the desktop and choose Properties).
  2. Right-click the Local Area Network or the connection you are using, then click Properties.
  3. Click the Advanced tab, and then click Settings.
  4. Click the Exceptions tab. The Exceptions tab with its default settings is shown in the following picture.


    See full-sized image
     
  5. Click the File and Printer Sharing checkbox.
  6. Click Ok (twice).

Method 2: Use the Netsh command

When you use the netsh command, it is the same result when you go into the Windows Firewall, clicking the Exception tab, and enabling file and printer sharing. To use the netsh command, click Start, point to All Programs, point to Accessories, then click Command Prompt. At the command prompt, type the following line and press ENTER:

netsh firewall set service type = FILEANDPRINT mode = ENABLE

 

No comments: