Discussion:
Cups Web Management Through Apache Proxy
Jeff Bush
2007-06-08 17:49:12 UTC
Permalink
I am using CUPs on the internet to create PDF files and would like to use the web interface to manage it. Problem is my hosting company is firewalled against almost all ports. So my idea was to use a proxy (so http://myserver/cups would proxy to localhost:631). It works, BUT, the CUPs interface uses all absolute links (like /printers) which messes it up. Trying to go to /cups/printers doesn't work either. The CUPs error logs report that they can't retrieve //printers (with the extra slash being the problem).

Also, I cannot setup a sub-domain proxy (which I am pretty sure would work) because I don't own a domain in the first place and my host won't let you use subdomains without having a domain.

I also can't simply make CUPs work on another port because all the ports not firewalled are all in use (by Apache and whatnot)

Does anyone know anyway to get CUPs to work through a proxy (or another method solving this issue)?

Thanks
Jeff
Kurt Pfeifle
2007-06-08 22:04:24 UTC
Permalink
Post by Jeff Bush
Does anyone know anyway to get CUPs to work through a proxy (or
another method solving this issue)?
CUPS *does* work through a proxy. Your problem is that your proxy does not work for CUPS (it does not allow the CUPS IPP port 631).

What about SSH port forwarding? You'd need a server on the internet that allows you to log in for a SSH session (on a firewall-allowed port). Preferably your CUPS server:

ssh -L 30631:cupsserver:631 -p 22222 ***@sshserver -N -f -g

- This logs you into the "sshserver" as "username" on port "22222" (of
course this port must have an sshd listening, and your firewall must
allow a connection).
- The ssh session immediately goes into the background and runs no
other command ("-N -f").
- Then whenever a connect goes to your local port "30631" this connect
is forwarded to "cupsserver:631" (via the background session to
"sshserver").
- the "-g" allows any external host to use that tunnel. If you want to
restrict the tunnel to local sessions, just leave away the "-g".

IOW, to connect to your remote "cupsserver", you'll have to type "http://localhost:30631" into the browser address line.


Cheers,
Kurt

--
Kurt Pfeifle
System & Network Printing Consultant --- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH - A RICOH Company ......... Stuttgart/Germany
Loading...