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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing over the internet

Status
Not open for further replies.

slymac

IS-IT--Management
Sep 20, 2001
36
CA
Hi,
I would like to be able to print from my hp9000 running hp unix 10 (with a remote printer setup) thru my sparcstation 5 running solaris 7 (this is my connection to the internet) over the internet to a home PC printer that is running software to route info to the printer.
I also have placed my home IP address in the hosts file of the hp box and used it's alias as the location of the remote printer name in printer setup. I have also entered the ip address of my sun box in the hosts file of my unix box.
My problem is getting the printed info to go thru my internet connection.

Can this be done? OR is there some other more efficient way?
Does anyone have any ideas?
Thanks
 
Most likely, one or both ends use IP address translation to get to the Internet. Your firewall and/or ISP does this for you. If this is the case, you are out of luck.

Bill.
 
I'm confused on the goal. Do you want to log in to the HP from home, and then print stuff? Or do you want to be logged int othe HP at "work" and print to you home printer?
 
The idea is a user could dial up to their local internet provider. Log into our system using an emulator and run a report to their own printer. For simplicity, I'm assuming they have a static internet IP address, so I would think that by adding that ip address in the hpux hosts file, then using the alias for that address as the remote system name with the remote printer setup and getting unix to route this print info thru my sparc box (my internet connection) to the home computer would make it work. Although, my problem is getting the info thru my internet connection.
 
Here is what you need to do. Create this script on the HP system you need to print from, lets say you name it localp.

#!/usr/bin/sh
#This is for vt100 emulation only
FILE=$1
if [ $TERM = vt100 ] ; then
echo ^[[5i
cat $FILE
echo ^L^M
echo ^[[4i
else
echo
echo "usage: $TERM != vt100"
echo
fi

Then just run the script and pass the file name as a parameter. Something like this.

$ /usr/local/bin/localp /etc/hosts

This will print the /etc/hosts file to whatever the end (remote) user has defined as the default printer in their emulation software.
The remote user HAS to use a emulator that supports vt100, and they have to emulate vt100. I've found that different emulators work better than others. (ProCom+ seems to work great). Also, in the script, the ^[ is escape. So the first sequence is "escape [ 5 i". You can create this in vi while in insert mode do a ctrl "v" then the esc key.
I use this all the time when I'm telneting all over the network to different UNIX boxes that do not have and printers defined local to that system.

crowe
 
Hi,
Unfortunately the way VPN works is once you are logged into the company's Network any Home network translations no longer work, unless the users Home networks addresses are known to the Company's network with a Company IP adress. Now you might be able to set up the routng tables on your Home PC to allow you see both networks at the same time but VPN likes to encrypt everything so I don't know.


I guess you solved this by putting your HOME printers IP address in the Company's hosts file. This is again assuming you don't have any NAT Protection on your HOME PC so that the address of your home printer is known to the outside world.


Another alternative would be from the script ( assuming it running in some telnet window from the home PC to the company's server ) is to FTP the results back to the Home PC but that would require an FTP server on the users computer to PUSH information.


I think the simplest solution would be to provide a script for them to take home which does the FTP and PULLs the information after they run the first script on the company's server to collect the information.

Logon on to VPN
Telnet in to company's server
run script ( which creates file /home/dave/blort )

go to your start menu ( assuming they are running windows at home )

click run
in the run window type
c:\getblort

getblort would look like.....

ftp < getblortcmds
notepad c:\temp\blort
rm c:\temp\blort

From inside NotePad you can click print.

getblortcmds would look like

open company server
user dave
password dave
lcd c:\temp
cd /home/dave
get blort
quit


now you might even be able to script from the WINDOWS the logging on to VPN and running SCRIPT so that you could have a single script ( from the users point of view ) called

printblort

---
 
Just to clarify, the example localp script is not effected by any IP address translation, NAT'ing or VPN stuff. It is based of the idea that a terminal, (like a WYSE 60) usually has 2 physical ports on the back. Often a printer/modem and AUX port. The control characters just tell the terminal (in our case, the terminal emulation software) to switch all the output over to the other port. then after dumping the contents of the file, switch back to the origional port (your screen). The control characters are specific to vt100.
When using this concept on a term emulator, it will switch over to the &quot;printer port&quot; and dump the output to the emulator's defined printer. It has no relationship to any IP traffic.

crowe
 
Thanks guys, I'm relatively new to this. Here's another look at this... On my Sun box, I'm running an Apache proxy server. Don't know much about this or how relevant it is, but if I ping an internet ip address from the sun box it will see it, just as if I ftp or telnet to an internet site, I can connect. Problem is if I do the same thing from my hp box, it doesn't see outside our internal network. Both have machines have ip addresses on my internal network. I can telnet to the sun box from the hp and then do whatever, though.

I need to find out how to make my hp box see thru my sun box. I would think it would require some setup on both machines but I'm not sure how to do this or if it would work.

I would also think that if I could ping from the hp box, thru the sun box then putting an outside ip address in settings such as those for a remote printer would allow me to send data to that ip address.

What do you think?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top