Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netcat help printing to remote linksys printserver

Status
Not open for further replies.

mattmc97

IS-IT--Management
Dec 4, 2003
51
US
Hello all, another question!

I have two offices that we are trying to connect, a main office and a remote office. The remote office connects with a vpn to the main office and then uses Tiny Term (terminal emulator) to use the proprietary unix software for our industry. Anyway, this unix Sco box prints to dot matrix printers and does not use windows printing. I have two linksys 3 port printservers, one at each location. I can print to the local one here at the main office using netcat:

netcat -h printserver -p 4010 <-- local works fine!

But when I try to print to the printer at the remote location, the connection is refused. I have enabled the cayman dsl router to allow ports 4010, 4020, 4030 (using tcp) through and pointed it to the linksys printserver at 192.168.1.100. When I run the debug netcat script:

netcat -d -h 65.70.34.xx -p 4010

It tells me: Connect to port 4010 on 65.70.34.xx : Connection refused.

What am I missing? Do I need to use UDP,ICMP, or PPTP (that is my only four options on the cayman web interface)?

thanks once again!

mattmc
 
Hello!

I want to same as you specified on your post. Did you ever come across the solution to print to remote printer using netcat?

If so, would you please share the "How to"?

Thank you in advance!


Jose Lerebours


KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Actually, I did not ever get netcat working. I ended up using the /etc/printcap file to create a new printer with the ip address of the external interface of the router.

lp29:lp=:rm=200.100.20.100:rp=L3:sd=/usr/spool/lpd/lp29:mx#0:

where lp29 is the new printer, rm is the external interface of the dsl router.

I then routed all incoming connections on port 500 of the router at the remote office ( I think 500, you will have to see what port your sco box prints on!) to my linksys printserver at that office. This worked pretty well although it would stop occassionally and I would have to go unplug the router and manually delete the que in unix.

There is a program by Brooksnet that will allow a windows computer to receive incoming Unix print jobs and then it will que them to the Okidatas using windows. It is a few hundred dollars and if I had to do this again, I would definately recommend going that route.

Here is brooksnet site:
Most of the information I found was at this site:
But it was literally a week of trial and error getting it to work. I would again recommend going the brooksnet route if you need any kind of reliability and quick setup. I would think you could have this up in a few hours if you are familiar with /etc/printcap file and commands to print and clear unix queues.

Here are a few commands I use regularly.

lpstat lpxx --- status of the printer lpxx where xx is printer #

cat /etc/printcap | lp -d lpxx --- print the printcap file to the lpxx printer where xx is the printer #

lpstat lpxx --- get the stuck jobs job number

then

cancel lpxx-### --- where xx is the printer # and ### is the job number

Well, that is all I can think of. Fortunately, we have abandoned our UNIX system and Okidatas for new HP Laser Printers with a service contract! So my SCO days are over for now and I use linux when I need something done.

Good Luck!

mattmc97
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top