Installing WSUS for SCCM and Configure Firewall Exceptions

Prajwal Desai
Posted by Prajwal Desai

In this post we will see the steps for installing WSUS for SCCM, configuring firewall exceptions, opening ports for SQL replication.

So far in this deployment series of SCCM 2012 SP1, in the first post we saw the steps to install and configure active directory domain services.

In the second post we saw the steps to install SCCM 2012 SP1 prerequisites and in the third post we saw the steps to install SQL server for SCCM 2012 SP1.

WSUS is Microsoftā€™s separate, stand-alone server-based product for distributing updates to Windows systems. It also uses the WUA to scan for patch applicability and subsequently install updates delivered by WSUS.

WSUS 3.0 Service Pack 2 is required for System Center 2012 Configuration Manager. SCCM 2012 SP1 supports only 64-bit site systems, you must use the 64-bit version of WSUS on one of the supported 64-bit editions of Windows Server.

You can install WSUS by opening up the server manager, roles and by adding WSUS role. I prefer to install the WSUS by downloading the setup file from Microsoft.

We will be installing WSUS role on SCCM.PRAJWAL.LOCAL machine with the user account sccmadmin.

Installing WSUS 3.0 SP2 for SCCM

Using the below steps, you can install WSUS for SCCM. Double click the setup file to begin the installation. On the welcome page click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 1

On the Installation Mode Selection, Choose Full server installation including Administrator Console. Hit Next.

Installing WSUS Configuring Firewall Exceptions Snap 2

Accept the license agreement and click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 3

It is recommended to store the updates on a different drive instead of storing it on C: drive. In our example we will be storing the updates locally on E:WSUS path. Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 4

For Database Options we will not be using the internal database, instead we will use the SQL database instance. Choose Use an existing database server on this computerĀ and click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 5

The SQL server is installed on the same server so it gets connected to SQL server instance quickly. If you have a SQL server running on other server select Using a existing database server on remote machine. You will have to provide the machine nameinstance to connect.

Installing WSUS Configuring Firewall Exceptions Snap 6

If you are planning to create a dedicated IIS site, then choose Create a Windows Server Update Services 3.0 SP2 Web Site, the port numbers for a dedicated site are 8530 and 8531 for Secure Socket Layer (SSL) connections. If you are planning to use a IIS default Website then Select ā€œUse the existing IIS Default Web siteā€ and click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 7

Click Next.

Installing WSUS Configuring Firewall Exceptions Snap 8

We have successfully completed the WSUS installation for SCCM. Click on Finish.

Installing WSUS Configuring Firewall Exceptions Snap 9

Once you click complete installing WSUS 3.0 SP2, the WSUS configuration wizard comes up. Do not configure it as we will be using SCCM to deploy the updates. This is an important step because most of you would configure this.Click Cancel to close the wizard.

Installing WSUS Configuring Firewall Exceptions Snap 10

After cancelling the WSUS configuration wizard, as a prerequisite you must install 2 updates for WSUS 3.0 SP2. Downloads are available for 32 bit and 64 bit systems.

Update for Windows Server Update Services 3.0 SP2 (KB2720211)

Update for Windows Server Update Services 3.0 SP2 (KB2734608)

Configuring Firewall for SCCM

To know what are the ports used in Configuration Manager 2012 SP1 , please go through this link :- http://technet.microsoft.com/en-us/library/hh427328.aspx. In order to successfully use client push to install the Configuration Manager 2012 SP1 client, you must add the following as exceptions to the Windows Firewall.

  • Printer Sharing
  • Windows Management Instrumentation (WMI)

We will create an inbound and outbound rule, add File and Printer sharing service as exception to firewall and an Inbound rule to allow WMI. We will perform this activity on the Domain Controller.

Click on All Programs, Administrative Tools, open Group policy management console. Right Click on the domain and Create a GPO. Provide a name to the GPO and click on OK.

Installing WSUS Configuring Firewall Exceptions Snap 11

Right click on the policy that you created and click on Edit.

Installing WSUS Configuring Firewall Exceptions Snap 12

Expand computer configuration, Windows settings, Security settings, Windows firewall with advanced security. Right click on Inbound rules and click on New Rule..

Installing WSUS Configuring Firewall Exceptions Snap 13

Click on Predefined and select File and Printer Sharing. Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 14

Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 15

Click on Allow the connection. Click Finish.

Installing WSUS Configuring Firewall Exceptions Snap 16

We have created an inbound rule to allow file and printer sharing, similarly right click on the Outbound Rule and click on New Rule. select File and Printer Sharing. Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 17

Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 18

Click on Allow the connection and click on Finish.

Installing WSUS Configuring Firewall Exceptions Snap 19

We need to create an Inbound Rule to allow the WMI service on our Firewall. So right click on Inbound Rule and click on New Rule. Click on Predefined and select Windows Management Instrumentation (WMI).Ā Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 20

Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 21

Click on Allow the connection. Click on Finish.

Installing WSUS Configuring Firewall Exceptions Snap 22

Opening Ports for SQL Replication

Why should you open port 1433 and 4022 ??

Port 1433 – SQL Server listens for incoming connections on a particular port. The default port for SQL Server is 1433. It applies to routine connections to the default installation of the Database Engine, or a named instance that is the only instance running on the computer.

Port 4022 – This is SQL Service Broker, Though there is no default port for SQL Server Service Broker, but this is the port that we allow inbound on our firewall.

Script to Open the ports for SQL Replication

If you are looking for a script to open the ports for SQL replication here it is. Copy this script in the notepad and save it as opensqlports.bat. Right click on the batch file and run as administrator.

@echo off
echo =========Ā  SQL Server Ports for SCCMĀ  ===================
echo.
echo.
echoĀ Ā Ā Ā Ā Ā Ā Ā  **Right click on the batch file and Run As Administrator**
echo.
echo.
echo Adding SQL Firewall Exceptions for SCCM
echo.
echo Adding TCP 1433
netsh advfirewall firewall add rule name = "SCCM SQL (TCP 1433)" dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN
echo.
echo Adding TCP 4022
netsh advfirewall firewall add rule name = "SCCM SQL (TCP 4022)" dir = in protocol = tcp action = allow localport = 4022 remoteip = localsubnet profile = DOMAIN
echo.
echo Done adding firewall exceptions
echo..

By default, Microsoft Windows enables the Windows Firewall, which closes port 1433 to prevent Internet computers from connecting to a default instance of SQL Server on your computer.

Connections to the default instance using TCP/IP are not possible unless you reopen port 1433. Therefore we will now create a group policy to open TCP ports 1433 and 4022.

Create a GPO to open TCP ports 1433 and 4022.

In case you choose to create a rule manually in firewall then open the Group Policy Management console. Create a new policy and name it as SQL Ports. Right Click the policy SQL Ports and edit it. In the Windows GP management console, expand computer configuration, Windows settings, Security settings, Windows firewall with advanced security.

Installing WSUS Configuring Firewall Exceptions Snap 23

Right click on Inbound Rule and create an Inbound Rule and select Port. Hit Next.

Installing WSUS Configuring Firewall Exceptions Snap 24

Select TCP, and specify port 1433 in specific local ports.

Installing WSUS Configuring Firewall Exceptions Snap 25

On the Action page, click Allow connection and hit Next.

Installing WSUS Configuring Firewall Exceptions Snap 26

The firewall rule will be applied for all the 3 profiles. Hit Next.

Installing WSUS Configuring Firewall Exceptions Snap 27

Name the rule as TCP Inbound 1433. Finally click Finish.

Installing WSUS Configuring Firewall Exceptions Snap 28

Similarly, Create an Inbound Rule for allow port 4022, choose TCP and specify the port number as 4022. Click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 29

Click on Allow the connectionĀ and then click Next.

Installing WSUS Configuring Firewall Exceptions Snap 30

Select Domain, Private and PublicĀ  and click on Next.

Installing WSUS Configuring Firewall Exceptions Snap 31

Provide the name as TCP Inbound 4022 to identify the rule. When you are done, hit Finish.

Installing WSUS Configuring Firewall Exceptions Snap 32

We have allowed TCP inbound ports 1433 and 4022 on our firewall.

Installing WSUS Configuring Firewall Exceptions Snap 33

On the client machine, launch the command prompt and type the command gpupdate /forceĀ and hit enter. In the same command prompt, type the command rsop.msc.

This will show the resultant set of policies, group policies that are applied to this client. Expand Administrative Templates and click on Extra Registry Settings.

On the right side pane you will find two ports 1433 and 4022 which are allowed in the firewall. This step is just to check if the policy has been pushed to the client machine or not.

Installing WSUS Configuring Firewall Exceptions Snap 34

Share This Article
Prajwal Desai
Posted by Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
10 Comments