I have a remote machine running CUPS and managing a locally (USB) connected printer. Everything works fine as expected.
I have another machine also running CUPS for a number of printers that are either local or on the same LAN of the server. Also this works fine.
I need to be able to print from this server on the first remote machine's printer.
I managed to have a remote forwarding like this on the remote machine:
machine# ssh -C -N -T -R 192.168.0.2:631:127.0.0.1:631 root@server
(192.168.0.2 is a dummy interface on the server)
This means that any connection on TCP port 192.168.0.2:631 in the server will be forwarded straight to TCP port 127.0.0.1:631 on the remote machine with the printer.
On server's CUPS web UI I've tried to add a printer (with the proper driver) like this:
ipp://192.168.0.2:631/printername
http://192.168.0.2:631/printername/
http://192.168.0.2:631/ipp/
http://192.168.0.2:631/ipp/printername
ipp://192.168.0.2/ipp/
ipp://192.168.0.2/ipp/printername
The printer in the remote machine doesn't print anything.
The logs say:
Unable to get the printer status (Bad request)
How can I add the remote machine printer to the server's CUPS configuration?
Thanks in advance.