LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-26-2010, 02:54 PM   #1
motoslide
LQ Newbie
 
Registered: Oct 2010
Location: Oregon
Distribution: CentOS
Posts: 3

Rep: Reputation: 0
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.
 
Old 10-26-2010, 04:15 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,010

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
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
 
Old 10-26-2010, 05:10 PM   #3
motoslide
LQ Newbie
 
Registered: Oct 2010
Location: Oregon
Distribution: CentOS
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 10-27-2010, 01:48 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,010

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
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
 
Old 10-27-2010, 06:32 PM   #5
motoslide
LQ Newbie
 
Registered: Oct 2010
Location: Oregon
Distribution: CentOS
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 10-28-2010, 06:20 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,010

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
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

Last edited by frieza; 10-28-2010 at 06:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access of an application on a Linux box (the "server") from outside the Local Area Ne Lordlava Linux - Newbie 3 08-08-2009 07:45 AM
Encapsulate ("tunnel") local outgoing packets using IPsec arrowheart Linux - Security 2 02-12-2009 02:05 PM
routing pptp tunnel subnet to local lan 0xception Linux - Networking 1 07-11-2006 03:26 PM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM


All times are GMT -5. The time now is 05:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration