Network Printing with CUPS
I’ve recently upgraded my network, I moved my server downstairs using a Belkin F5D7330uk, installed a new ultra quiet hard drive from Seagate (ST3250820ACE) which is very quiet and is possibly my best buy of the year and I’d reinstalled moving from Debian Etch to CentOS 5.2.
So, all that was moved downstairs, along with my printer and I wanted to get printing networked.
The problem I had last time was I was trying to get it working through Samba, too hard that way, I was redirecting files all over the place, there is an easier way.
The printer I have is an old Kyocera FS-1750 laser printer connected via Parallel port to LPT1 on my server which is an old Compaq DeskPro PC.
Here’s how I did it:
Install cups on your server, in my case its called falcon:
yum install cups
Once installed start it:
service cups start
Using my desktop machine “tie” I redirected port 5555 to port 631 (cups admin port) on falcon:
ssh -L 5555:falcon:631 user@falcon
Using tie, my desktop PC, I opened up firefox and entered the url:
127.0.0.1:5555
This then redirects the input to the connection you’ve got to your server using ssh so keep that terminal open, this is an effective method and I often use it to redirect to routers home pages or internal network devices on remote sites which I don’t want forwarded for all and sundry through the router.
This will then prompt you with the CUPs admin page:

Once there click on administration and tick the box which says “Share published printers connected to this system” you might also want to tick the box which says “Allow remote administration” but I had some timeout issues with it so for the purposes of this guide I’ll continue to use the port forwarding method.
Once you have those boxes checked click the Change Settings button:

You should then be prompted for your root username and password for your server. Enter these and press OK to continue. Cups should then restart..
Now the environment is prepared you can start to add a printer to your server.
From the CUPS admin webpage click on Home then click the Add Printer button in the middle, CUPS will then ask you to name your printer, I chose kyocera considering I don’t have another one, then if you like you can add a location and description in the fields provided:

Click Continue, you will then be asked to choose the device for your printer, in my case its LPT #1:

Click continue.
On the next page choose your manufacturer, again in my case Kyocera, not Kyocera Mita then click continue and choose your model. I went for Kyocera FS-1750 (en) then click Add Printer.
Cups should then successfully add your printer for you, you should see this in the printers tab.
Whilst on the printers tab it would be worth checking that the printer is set to be published, if you followed this guide in the correct order it should only say “Unpublish Printer” which is the opposite of what you want to do so don’t click it.
Now comes the part of adding the printer to you various clients, in my case a Windows XP virtual machine and my Fedora 10 desktop aka tie.
To add the printer to Fedora 10 it was simple, so simple in fact that I just went to System -> Administration -> Printing and it had appeared. Now I’m not sure if this will be the case for everyone so incase you need to add it manually from the Printing window click New -> Printer and choose IPP (Internet Printing Protocol) then input the IP address or name of the print server in the Host: box and click Find Queue, it should find your printer in there, if not in Queue type /printers/{printername} so mine would be /printers/kyocera press verify for good measure.
This all worked for me, if you have problems then check things like your firewall on your server to ensure that you are allowing the correct port through, 631.
Adding the printer to Windows is just as simple:
Click on Start
Printers and Faxes
Add a Printer -> Next
A network printer or printer attached to another computer -> Next
Connect to a printer on the internet or on a home office network and enter the URL: http://{server}/printers/{printer name} so in my case http://falcon:631/printers/kyocera -> Next
It will then prompt you to install a driver, check to see if the correct one is listed, if not download the correct one for your printer -> click OK and that should be it.
It’s always worth printing a test page to ensure everything has gone as planned.
Hopefully you followed that and now have network printing no your devices.



1 comment