Unix Technical Forum

A little frustrated with network printer setup with CUPS

This is a discussion on A little frustrated with network printer setup with CUPS within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi I just setup a CUPS printer on my slackware router machine. Accessed it using localhost:631/admin and was able ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 04:30 PM
Madhusudan Singh
 
Posts: n/a
Default A little frustrated with network printer setup with CUPS

Hi

I just setup a CUPS printer on my slackware router machine. Accessed it
using localhost:631/admin and was able to print to it (was unable to browse
the printers to print a test page - but since lp -d hpoj (hpoj - name of
the queue) does the job, I am not worried about it, though I am curious
about this.).

My firewall script reads (relevant portions) :

IPPPORT=631
LAN_IP_RANGE="192.168.1.0/24"
LO_IP="127.0.0.1"

$IPTABLES -I INPUT -p tcp -s $LAN_IP_RANGE --dport $IPPPORT -j ACCEPT
$IPTABLES -I INPUT -p tcp -s $LO_IP --dport $IPPPORT -j ACCEPT


The funny thing was that port 631 (ipp) was not listed in /etc/services
and /etc/protocols. Had to hand edit them.

Now, the LAN above is a wireless network to which only one Debian powered
laptop is connected :

I edited the CUPS printer setup :

Device URI: http://192.168.1.1:631/ipp/lp0 (lp0 is the name of the parallel
port to which the printer is connected)

(192.168.1.1 is the IP address of the Slackware router with firewall).

Now when I try to print a test page from the laptop, I get :

"Unable to get printer status (client-error-forbidden)!"

When I tried to use the KDE printer tool to add the queue, it complained
that it could not find the queue on the server !

I like the idea behind CUPS, but the lack of documentation pertaining to my
network setup and continued inability to setup CUPS correctly is
frustrating. It used to be so much easier with LPD.

Any ideas ? If I am able to sort out this nonsense, I promise to document
my experience so that it eases the experience of others.

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 04:30 PM
micke
 
Posts: n/a
Default Re: A little frustrated with network printer setup with CUPS

Madhusudan Singh wrote:

> Hi
>
> I just setup a CUPS printer on my slackware router machine.
> Accessed it
> using localhost:631/admin and was able to print to it (was unable to
> browse the printers to print a test page - but since lp -d hpoj (hpoj -
> name of the queue) does the job, I am not worried about it, though I am
> curious about this.).
> SNIPPed ot the rest.


I don't have port 631 listed in services or in protocolls and this is as far
as I know not needed. Correct me if I'm wrong.
Connecting from a client is a problem that I had a while ago. But after
checking the following in /etc/cups/cupsd.conf it works as it should.

Normally you don't have to change all of the standard things in the
conf-file but some of it. Where the diffrent directories are should follow
standard.
(Set it to what you have)
------------------------------------
ServerName name.domain.ext
ServerAdmin name@domain.ext

BrowseDeny All
BrowseAllow 192.168.1.*
BrowseAllow 127.0.0.1

BrowseOrder deny,allow

<Location />
Order Deny,Allow
Deny From All
Allow From 192.168.1.*
Allow From 127.0.0.1
</Location>

AuthClass User
----------------------------------
This is the changes I did to get it work, perhaps it will help you to?

Micke
--
# The truth lies in there, #
# somewhere in the manual. #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 04:30 PM
Joost Kremers
 
Posts: n/a
Default Re: A little frustrated with network printer setup with CUPS

micke wrote:
> I don't have port 631 listed in services or in protocolls and this is as far
> as I know not needed. Correct me if I'm wrong.


man services

it's only needed if you want to use the cups service by specifying its
name. if you always connect by number, there is no need to list it in
/etc/services.

--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 04:30 PM
micke
 
Posts: n/a
Default Re: A little frustrated with network printer setup with CUPS

Joost Kremers wrote:

> micke wrote:
>> I don't have port 631 listed in services or in protocolls and this is as
>> far as I know not needed. Correct me if I'm wrong.

>
> man services
>
> it's only needed if you want to use the cups service by specifying its
> name. if you always connect by number, there is no need to list it in
> /etc/services.
>

Thanks!
I always use the numbers : )
Micke
--
# The truth lies in there, #
# somewhere in the manual. #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 04:31 PM
Madhusudan Singh
 
Posts: n/a
Default Re: A little frustrated with network printer setup with CUPS

micke wrote:

> Madhusudan Singh wrote:
>
>> Hi
>>
>> I just setup a CUPS printer on my slackware router machine.
>> Accessed it
>> using localhost:631/admin and was able to print to it (was unable to
>> browse the printers to print a test page - but since lp -d hpoj (hpoj -
>> name of the queue) does the job, I am not worried about it, though I am
>> curious about this.).
>> SNIPPed ot the rest.

>
> I don't have port 631 listed in services or in protocolls and this is as
> far as I know not needed. Correct me if I'm wrong.
> Connecting from a client is a problem that I had a while ago. But after
> checking the following in /etc/cups/cupsd.conf it works as it should.
>
> Normally you don't have to change all of the standard things in the
> conf-file but some of it. Where the diffrent directories are should follow
> standard.
> (Set it to what you have)
> ------------------------------------
> ServerName name.domain.ext
> ServerAdmin name@domain.ext
>
> BrowseDeny All
> BrowseAllow 192.168.1.*
> BrowseAllow 127.0.0.1
>
> BrowseOrder deny,allow
>
> <Location />
> Order Deny,Allow
> Deny From All
> Allow From 192.168.1.*
> Allow From 127.0.0.1
> </Location>
>
> AuthClass User
> ----------------------------------
> This is the changes I did to get it work, perhaps it will help you to?
>
> Micke


It did more harm than good.

Now localhost:631 is inaccessible and netstat -l does not list port 631 as a
listening port
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 04:31 PM
micke
 
Posts: n/a
Default Re: A little frustrated with network printer setup with CUPS

Madhusudan Singh wrote:
> It did more harm than good.
>
> Now localhost:631 is inaccessible and netstat -l does not list port 631 as
> a listening port


Weird. Very weird. I'll keep on reading the manual(s) for cups to see what I
can come up with : ) I've read them a few times but a few more times won't
hurt.

btw did you restart /etc/rc.d/rc.cups? Make sure that the deamon is running.
It have happend sometimes that it doesn't start up as it should. And I
can't figure out why, since the second time I do a restart it starts and
works as it should.

Micke
--
# The truth lies in there, #
# somewhere in the manual. #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:30 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com