Setting up a network printer

by jenny on 13 November 2008 - 03:59pm in

Providing you have a working local printer using CUPS, it's quite easy to share it across a local subnet.

In /etc/cups/cupsd.conf on the CUPS server, add a line directly after this line:

Listen localhost:631

...using the IP of the server:

Listen localhost:631
Listen 10.0.0.2:631

In the same file, locate this section:

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
</Location>

...and add two lines allowing access from your subnet:

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow from 10.0.0.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow from 10.0.0.*
</Location>

Restart CUPS.

/etc/init.d/cupsys restart

On your client, you should now be able to view the CUPS admin pages: http://10.0.0.2:631/

Use the handy System -> Administration -> Printing menu to set up a new printer. Click "New Printer", select "Internet Printing Protocol (ipp)" and enter the IP of your CUPS server. Click "Find Queue". Your printer should show up in the select list. Continue by choosing a driver for it, etc. You can now print from anywhere on your subnet!