Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] cups as a print server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jamapii
Guru
Guru


Joined: 16 Sep 2004
Posts: 580

PostPosted: Sat Apr 27, 2019 2:51 pm    Post subject: [solved] cups as a print server Reply with quote

Hello

I'm looking for a way to use cups as a print server or printer server.

So there is a cups box, let's call it printserver, which can (hopefully) print to an existing printer. Now I have a new box which has cups installed, and I'm trying to set the printserver box as a backend so that the local cups can relay the print jobs to the printserver box.

How can this be done?

The problem is that there seems to be no authoritative documentation for this.

First, the local cups server will ask for an URL and suggest a few examples:

ipp://printserver/ipp/service

The /ipp/ part is one where all available documentations disagree. Some say /printer/, some say /printers/, some say just /,... and of course none of these work. The "service" part should be the name of a printer or class, or some alias, right?

Then, what printer driver must be used? There is an "IPP Everywhere" thing, and some others. At least Postscript should work, right?

Anyway, it doesn't seem to work no matter what. I'm aware that cups servers seem to lose their function after some time passes, but this box was never updated, so the rule shouldn't apply.

The weirdest part is right in the middle of the Gentoo cups doc. You are supposed to edit /etc/cups/client.conf to change the ServerName. It is originally a socket file (very weird), should be set to a print server's host name (just what the file system check?) Why would anyone limit their laptop to a single cups server to print? Or what else is that supposed to do?

What is the correct, generic way to do it?


Last edited by jamapii on Sat May 11, 2019 4:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Sat Apr 27, 2019 3:28 pm    Post subject: Reply with quote

jamapii,

On your printserver box browse to http://localhost:631/admin/
Under Advanced ▶ on the right hand side, click on
Code:
Share printers connected to this system
so the server listens for incoming print jobs.

Before the change, cupsd is only listening on localhost.
Code:
$ netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 0.0.0.0:distcc          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN     
tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN     
udp        0      0 NeddySeagoon_Static:ntp 0.0.0.0:*                         
udp        0      0 localhost:ntp           0.0.0.0:*                         
udp        0      0 0.0.0.0:ntp             0.0.0.0:*                         
udp6       0      0 ned6:ntp                [::]:*                             
udp6       0      0 2a02:8010:c002:3:2e:ntp [::]:*                             
udp6       0      0 localhost:ntp           [::]:*                             
udp6       0      0 [::]:ntp                [::]:*   


I have both IPv4 and IPv6
Code:
tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN
ipp is internet printing protocol.

After the change, its listening on all interfaces.
Code:
tcp        0      0 0.0.0.0:ipp             0.0.0.0:*               LISTEN     
tcp6       0      0 [::]:ipp                [::]:*                  LISTEN


Now that your print server is listening to the network for incoming IPP connections, its time to play with cups and ipp on other systems.
If the print server has a firewall, you need to allow traffic in on port 631.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jamapii
Guru
Guru


Joined: 16 Sep 2004
Posts: 580

PostPosted: Sun Apr 28, 2019 9:54 am    Post subject: Reply with quote

Hello

I found this old print server can't even print a test page from its own web interface, even with different and new ppd files. So there's no point trying any more.
Back to top
View user's profile Send private message
jamapii
Guru
Guru


Joined: 16 Sep 2004
Posts: 580

PostPosted: Sat May 11, 2019 4:55 pm    Post subject: Reply with quote

I have set up a new cups printserver and printed a test page.

It must have Printer Sharing and Internet Printing enabled. Internet printing just means that incoming jobs from a non-local network are accepted.


To make cups (a different cups installation e.g. on the laptop) use this as a proxy/relay, I add a new printer, select IPP protocol, the URL is ipp://printserver/printers/printer-name, select "Generic" -> Generic IPP Everywhere Printer.

The /printers/ part may or may not be replaceable with /ipp/ or just /. I haven't tried this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum