Operating System - HP-UX
1751868 Members
5286 Online
108782 Solutions
New Discussion юеВ

Printing in HPUX over Internet

 
SOLVED
Go to solution
Gabriel Hermida
Occasional Advisor

Printing in HPUX over Internet

Hello.

I've been working with remote printers in HPUX over printers connected to Windows 95/98 with print services like TunPLus or PC/TCP. To do this, I've been using the IP number of the PC, that I know. It works fine.

Now, I have users connected to my system over Internet, using a connection with an ISP. I don't know what IP number the ISP assign to the user. The users are using telnet to connect to my HPUX server.

How can I print to the printer connected to this PC?

Thanks for your help.

Bye.

Gabriel.
13 REPLIES 13
Marcelo De Florio
Frequent Advisor

Re: Printing in HPUX over Internet

You are a configure the lpd service in your workstation (Control Panel, Network, Services (Service of print over TCP/IP); and then configure the remote queue in the server HP-UX with SAM (Printers and Plotters, LP spooler, Add Remote Printer/Plotter).

Regards.
Rick Garland
Honored Contributor

Re: Printing in HPUX over Internet

Is pass-thru printing an option?
Gabriel Hermida
Occasional Advisor

Re: Printing in HPUX over Internet

Alan, sorry I don't know what is "pass thru printing".
Thanks.
Tim Malnati
Honored Contributor

Re: Printing in HPUX over Internet

The vast majority of ISP users are assigned an IP address with DHCP when they login to their ISP. The IP address is usually associated to the POP (pont of presence) that they dial into. Some ISP's will issue a dedicated (static) IP address to a user, but at a premium. Some can be as little as five bucks a month and I've seen some as expensive as $50/month. I suppose you could do some custom stuff to direct the print job to a changing IP address, but there is nothing that I know of using TCP/IP and/or DNS that handle it out of the box. WINS supports it, but I would be more than a little concerned about making WINS or netbios visible in any way over the internet.
Kofi ARTHIABAH
Honored Contributor

Re: Printing in HPUX over Internet

As I understand it, you want to be able to determine the IP address of a user logged in via telnet to an HPUX box right? If this is the case, I have the following suggestions:

1. Consider using ssh and not telnet (telnet traffic on the internet is plain text and NOT secure)
2. If you use ssh, you can find out a client's IP address with:
# CLIENT_IP=`echo $SSH2_CLIENT | awk '{ print $1 }'`

now that you have the CLIENT_IP, you can use that in setting up the remote printting.

Good luck
PS. I do not think that telnet has the ability to return the IP address of the connecting client... anyone?
nothing wrong with me that a few lines of code cannot fix!
Marcelo De Florio
Frequent Advisor

Re: Printing in HPUX over Internet

You can obtain the IP address, execute the netstat -a command (and then see what address not in your net, and connected a your port 23, for example
YOUR_SERVER.telnet CLIENTWINDOWS.X.1168). If the IP is assigne with DHCP you are use a gateway a space of names of windows.x (WINS), this gateway is SAMBA and then you are assigne a name for computer (windows.x) and define the printer with this name.

regards.
Kofi ARTHIABAH
Honored Contributor

Re: Printing in HPUX over Internet

Marcelo, that is on the assumption that there is only one user logging in from the internet as any one time... netstat -a will list other telnet sessions... how do you tie a telnet initiated by user A from user B??? the plot thickens :)
nothing wrong with me that a few lines of code cannot fix!
John Palmer
Honored Contributor
Solution

Re: Printing in HPUX over Internet

You could log the 'comment' field returned by who -umR when the telnet session logs in. This will be the user's host name (if it can be resolved) or the IP address if it can't.

who -a will also report the host name or IP address but it may be limited to a certain number of characters.

nslookup can then be used to resolve the IP address from the host name.

Regards,

John
Kofi ARTHIABAH
Honored Contributor

Re: Printing in HPUX over Internet

Good thinking John...

So Gabriel, you could include the following lines in your users' .profile -

myaddr=`who -umR | awk '{ print $8 }'`
myip=`nslookup $myaddr |grep Address | awk '{ print $2 }'`

export myaddr myip

this would set the env variables myaddr and myip for each user that logs in...

Good luck
nothing wrong with me that a few lines of code cannot fix!