LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux (in "Cloud") to Linux (local LAN) tunnel for multiple local printers. (https://www.linuxquestions.org/questions/linux-networking-3/linux-in-cloud-to-linux-local-lan-tunnel-for-multiple-local-printers-840596/)

motoslide 10-26-2010 02:54 PM

Linux (in "Cloud") to Linux (local LAN) tunnel for multiple local printers.
 
In an attempt to move our application into "the cloud", I have a need to allow the *NIX-based application to send jobs to multiple printers on our LAN. My thought is that I could configure many port-forwarding rules on our hardware firewall/router, but I'd like to create a method which isn't router-specific. Therefore, I'd prefer to build a linux appliance on that LAN side and utilize it as a print server.
I have created SSH keys that allow me to establish a connection to the Cloud Linux server.
What needs to be configured on the LAN Linux server to allow it to receive and process print commands from the Cloud Linux server?

I have a basic concept of SSH tunneling, so I could tunnel port 9100 (and 9101, 9102, etc.) between the servers. How does LAN Linux know to listen on port 9102 and send it to the correct spooler destination?

Thanks in advance.

frieza 10-26-2010 04:15 PM

just a question but how are the printers attached to the lan
are they lan based printers, or local printers?
the method of attack will differ based on the answer to this question

motoslide 10-26-2010 05:10 PM

The printers are most likely network-based printers. In some fashion, the LAN Linux server will be able to act as teh print server using its CUPS spooling subsystem. In some cases, the printers might be using a Port-9100 interface (HP JetDirect), or connected serially using a DigiBoard device, or even slaved off a Windows PC using SMBSPOOL. Lots of options, as long as the LAN Linux box can be my print server.

Hope that helps. I'm open to alternate ideas.

frieza 10-27-2010 01:48 PM

hmm well if they are network based printers then technically you don't need a print server since the workstations can directly talk to network printers, unless you are looking for a way to centrally manage print jobs, you can simply logically attach network printers to the workstations, that is the beauty of a networked printer

motoslide 10-27-2010 06:32 PM

But the "workstation" is the Linux box in the cloud and the printers are on a LAN on this side of a NAT/firewall. The printers don't have WAN exposure.

I believe I've found a solution for network-based printers using this ~.ssh/config file on the Local (LAN) Linux system:
Host cloud_linux
HostName 123.45.67.89
KeepAlive yes
User cloud
RemoteForward 9102 192.168.1.50:9100
RemoteForward 9103 192.168.1.52:9100

Then on the Cloud Linux, the printers are configured like so:
device for p4: socket://localhost:9102
device for p6: socket://localhost:9103

I'm using this command on Local (LAN) Linux to initiate the tunnel:
$ ssh -N cloud_linux

This doesn't solve all of my issues, though. I will still have some printers on the LAN side which are connected directly to PC Workstations (using Samba) or connected to the Local Linux via serial I/F. For those, I'll need some kind of listening script to push the jobs through the Local Linux's CUPS subsystem.

I hope that all makes sense.

frieza 10-28-2010 06:20 PM

in that case you would simply configure cups to 'share' the printer
if cups is configured properly then just browse to http://localhost:631/admin (on the workstation with the printer) in say.. firefox
the share options should be there


All times are GMT -5. The time now is 06:38 PM.