Open a Firewall Port for Db2

IBM Db2 is one of the largest and most sophisticated enterprise DBMS packages ever created. Db2 is a product of IBM, the company that invented SQL.  This topic is the second step in a five topic sequence showing a complete installation, and then utilization, of Db2 for Developers from the very beginning.  Please see Install Db2 topic for basic info on Db2.

 

Disclaimer: These topics were accurate when written, using the versions of installation software indicated.  Third party packages can and do change, so this topic may be out-of-date.  It is provided as an example of how such installations can be approached.

 

Installing Db2 and readying it for use in typical installations involves five steps:

 

Install Db2

 

Open a Firewall Port for Db2

 

Create a Database in Db2

 

Install Db2 Client

 

Connect to Db2

 

This is the second topic in the above sequence of steps.

 

So far, we have installed Db2 on our target machine.   We now will enable use of Db2 through networks by opening a port for Db2 through Windows Firewall.

Local Connections or Connect through the Network?

If we have Manifold installed on the same computer on which we install Db2, and if we will always use our Db2 installation from the same computer, we can skip this step.  For example, if we are an individual user with only one computer and we do everything on that one computer, we can always connect to Db2 from Manifold using a localhost designation, that is, not going through any network.

 

We only need to do this procedure if we want to access this Db2 installation through the network from other computers.  For example, if we work in an organization with several computers and one of them hosts this Db2 installation but we actually do our Manifold work on a different computer, to connect from our desktop computer to the machine hosting Db2 we have to be able to connect to it through the web.

Open a Port in Windows Defender Firewall

We are using a 64-bit Windows 10 server system on which we have installed Db2, to which we have connected via Remote Desktop (RDP).  This entire topic was conducted on that machine via RDP.  Our Windows login used for RDP has Administrator rights.

 

Microsoft's Windows Defender Firewall will prevent connections through the network to Db2, so we must first configure the firewall to allow connections, and then (next topic) we must configure Db2 to accept such connections by using TCP/IP.  That is easy to do.

 

We will allow connections through port 50000, the default port for Db2.   We can use a similar procedure to open a port through the firewall for any other database, such as PostgreSQL, for which we might want to allow connections through the Windows firewall.

 

Launch Windows Control Pane, the full version.  That is easiest to do by entering Windows Control Pane in the Windows taskbar search box for launching commands.

 

 

Choose Windows Defender Firewall.   When the app launches, click on Advanced Settings in the left hand stack of choices.

 

 

Click on Inbound Rules. in the left hand pane.   The illustration above appears.  Click on New Rule.

 

 

Choose Port and click Next.

 

 

Enter 50000 and click Next.  That is the default port for Db2.

 

 

Choose Allow the connection and click Next.

 

 

Leave all check boxes checked.  Click Next.

 

 

Enter Db2, or some other suitably descriptive name which will remind us what this rule does,  and click Finish.

 

 

Done.  We can now close the dialogs by clicking the X buttons in the upper right corners.

 

We have opened a firewall port to stop Windows from blocking access to Db2 from the network.  Next, we create a database within our Db2 installation.

 

Next Steps

Continue this case study on installing Db2 with the Create a Database in Db2  topic.

 

Jump to the beginning of the case study: Install Db2

 

See Also

Schema

 

DBMS Data Sources - Notes

 

Project Pane

 

File - Create - New Data Source

 

Command Window

 

Real and Virtual Components

 

Install MySQL

 

Install SQL Server

 

Install PostgreSQL

 

Install Oracle

 

Install Db2

 

Create a Database in Db2

 

Install Db2 Client

 

Connect to Db2

 

Big List of Formats and Data Sources

 

Example: Switching between Manifold and Native Query Engines