How To: Configure Windows Server 2008 R2 Print Server for Use with Linux Clients

TABLE OF CONTENTS:

  1. BACKGROUND
  2. DIRECTIONS
    1. Install the “Print and Document Services” Role
    2. Install the Printer on the Server
    3. Share the Printer
    4. Configure Server for LPD
    5. Configure Server for IPP
  3. Wrapping Up

BACKGROUND:

At my house I have a Canon Pixma MP620 printer which has some Linux compatibility, but has always proven difficult to get it to work with my Linux computers.  The main issue is that this printer uses Canon’s BJNP protocol, which requires a special port to be created on the computer (usually during install of the Canon software & drivers) to be able to use the printer — the following link talks about BJNP a bit more, and some of its many woes: http://www.qwhatis.com/what-is-bjnp/.

Linux users might have some luck with installing the cups-bjnp package to get their BJNP printers to work, but I decided to go a different route. I already had a Windows Server 2008 R2 machine up and running, and I had never gotten a Linux client to print using the print server on my old Server 2008 machine, so I figured I would try to setup a print server on the Server 2008 R2 machine and have my Fedora desktop use that to print to the Canon printer.

This post is going to focus on setting up the Windows Server 2008 R2 print server, and the next post will focus on configuring my Fedora desktop to print to it.

DIRECTIONS:

 Install the “Print and Document Services” Role

  1. Open Server Manager: Start -> Administrative Tools -> Server Manager

    Server Manager
    Server Manager Screenshot
  2. Click Add Roles
  3. Select “Print and Document Services”, click Next
  4. Select the Role Services you would like to use.
    These are the printing protocols you would like to make available to your clients.  In my case, I selected both LPD Service and Internet Printing; I did not select the Distributed Scan Server, this requires extra install information.
  5. Click through the rest accepting defaults

Install the Printer on the Server

This process will differ from printer to printer.  For my printer, the Canon MP620, I had to download and install the Windows 7 64-bit driver package.

Share the Printer

  1. Open the “Print Management” mmc: Start -> Administrative Tools ->Print Management
  2. Under “Custom Filters” on the left, select “All Printers”
  3. Right-click on the printer you want to share and select “Manage Sharing”
  4. Check “Share this Printer”, and type in a share name (ex: CanonMP620)

    Sharing Printer
    Sharing a Printer on Server 2008 R2
  5. Click Apply, then click OK

Configure Server for LPD

At this point you are done on the server side if you are going to be using LPD as the printing protocol.  It might be a good idea to verify that the firewall on your server is allowing inbound traffic on TCP port 515.  The built-in Windows Firewall with Advanced Security automatically created the rule for me when I performed the install of the “Print and Document Services” role (see screen shot below)

LPD firewall rule
Automatically added firewall rule to allow LPD traffic

Configure Server for IPP

A few things to note here:

  • Windows creates an IPP website under the default IIS site, which usually listens on TCP port 80 and TCP port 443 (http and https) — verify your firewall allows inbound traffic on TCP 443.
  • The security on the IPP site requires authentication.  I suggest you keep this for security reasons; not just anyone can print to your printer.
  • The security on the IPP site requires that you use HTTPS, even though the site also listens on HTTP.  I also suggest keeping this for security reasons; someone sniffing your network traffic won’t be able to see the credentials you send to the server when printing.
  • I suggest you create a new user on the server with minimal privileges, since its username and password will be stored in a text file on the Linux client (In the Linux client setup I will also show an alternative way where the credentials aren’t stored)
  1. Open “Internet Information Services (IIS) Manager”: Start->Administrative Tools->Internet Information Services (IIS) Manager
  2. Expand “Sites”, expand “Default Web Site”, click on “Printers”

    ipp web site
    IPP Web Site
  3. In the middle pane, double-click “Authentication”
    Open_Authentication
  4. Edit the settings so only “Basic Authentication” is Enabled (if you didn’t want to require any authentication, then edit the settings so only “Anonymous Authentication” is Enabled)

    Only Basic Authentication
    Only Basic Authentication

Wrapping Up

At this point your server is configured and ready go.  If you are using IPP, then you should be able to browse to https://<serverName-or-IPaddress>/printers/ (if it asks for a username and password, use the username and password of the new user you created).  Now you can move on to configuring your Linux client.

If you have any questions or comments, leave them below!