Configure Windows Firewall settings for File and Printer Sharing with Windows XP
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.
Method 1: Use the Windows Firewall
- 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).
- Right-click the Local Area Network or the connection you are using, then click Properties.
- Click the Advanced tab, and then click Settings.
- Click the Exceptions tab. The Exceptions tab with its default settings is shown in the following picture.
- Click the File and Printer Sharing checkbox.
- 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
Last Modified: 2015-04-26.