1827809 Members
1931 Online
109969 Solutions
New Discussion

Web access

 
SOLVED
Go to solution
lVl_1
Super Advisor

Web access

Ciao tutti,

I would like to get Web access from an HP-UX box (private IP). Could you please give me the main steps to follow?

Thanks to all who will participate
53 REPLIES 53
Marco A.
Esteemed Contributor

Re: Web access

What's exactly what you want to do?

Access the box from outside? access another internal box from your box!?

Please explain us to give you a good answer...

Best regards,


Marc0
Just unplug and plug in again ....
Ivan Krastev
Honored Contributor

Re: Web access

Just setup networking on server - gateway, resolving and implement some masquerading/NAT on gateway for that ip's.

After that use included browser (it depend on version of HP-UX) or install wget - http://hpux.cs.utah.edu/hppd/hpux/Gnu/wget-1.10.2/


regards,
ivan
lVl_1
Super Advisor

Re: Web access

Ivan you got what I meant: access a website from the hp-ux box and download files from it. Thanks guys for your fast answers. As for the masquerading/NAT step, what exactly should be set on the gateway apart from a private-public IP correspondence for this node? By now I do not have access to the gateway configuration.
Marco A.
Esteemed Contributor

Re: Web access

basically is that IVI, you need to be able to ping your gateway, after that you will be able to use the wget application.

#ping

How to configure that is included in the info sent previously.

Best regards,

Marc0
Just unplug and plug in again ....
Marco A.
Esteemed Contributor
Solution

Re: Web access

sorry IVI, I didn't include that info ...

but check and configure your ...

# vi /etc/rc.config.d/netconf

ROUTE_GATEWAY[0]=.

# /sbin/init.d/net stop
# /sbin/init.d/net start


Also, with this other command you asign your default gateway.

#/sbin/set_parms addl_netwrk

Best regards,

MArc0

Just unplug and plug in again ....
lVl_1
Super Advisor

Re: Web access

Let me know if I've understood well the following: to be able to use the wget command, the only requirement is that the ping to the gateway works.
Actually I can ping it from the hp-ux box. I downloaded the following file from the link you sent to me: wget-1.10.2-hppa-11.23.depot.gz
But when using the gzip -d command on it I get the following error:

gzip: /wget-1.10.2-hppa-11.23.depot.gz: invalid compressed data--crc error

gzip: /wget-1.10.2-hppa-11.23.depot.gz: invalid compressed data--length error
Marco A.
Esteemed Contributor

Re: Web access

hmmm, apparently it is corrupted ...

Try to uncompress that file in your computer first! while I look for the same application in another location...

Marc'o
Just unplug and plug in again ....
Mel Burslan
Honored Contributor

Re: Web access

in order to access to the internet from this hpux box, you have to know the ip address of the router that has at least two legs, one on the internet and another one on the subnet that your hpux box is sitting.

Let's assume your hpux box IP address is:

10.2.121.95 with a netmask of 255.255.255.0

and let's assume that the gateway router's address on this subnet is:

10.2.121.254 with the same netmask.

on your hpux command line, logged in as root, run this command

route add default 10.2.121.254 1

this will override whatever is/was your default router was, so if you have any critical application, depending on a network connection to another place, DO NOT DO THIS !

At this point, you should be able to start your browser and navigate to a popular site like google.com and see the page load.

If it is not loading, it menas that, there is a firewall between your subnet and the internet gateway router, which needs to be opened up for your hpux server's ip address. If you are not the firewall admin at the same time, you need to talk to these people.

If everything is working, come back and post here to get the instructions about how to make your default route permanent, so that it will not go away with reboot.

Hope this helps.
________________________________
UNIX because I majored in cryptology...
Marco A.
Esteemed Contributor

Re: Web access

Well, I see that at http://hpux.connect.org.uk/hppd/hpux/Gnu/wget-1.10.2/ you have the oportunity to take that from html of ftp server, try the other server, download the software, and try to uncompress it.

Let us know your results.

Marc'o
Just unplug and plug in again ....
Marco A.
Esteemed Contributor

Re: Web access

IVI, I'm testing that right now on my 11.23, the html server file does not work, but the ftp server yes.
If you can ping your gateway, you can go outthere.. so, my application is running good, as expected, hope yours too.

Marc'o
Just unplug and plug in again ....
lVl_1
Super Advisor

Re: Web access

Thanks to all of you for helping.

Mel: I updated the netconf file. It really helps. I'm new at hp-ux and I thought that the ifconfig lanx command was enough to configure the network. But how come there can be different information in the netstat -ni output and the netconf file? (I had different IPs!)

Carl'o: I downloaded the ftp depot file, is that the one you used? Then what tool did you use to decompress it (Are you on WinXP like me?) before transferring it to the hp-ux box? Do you have any idea why the file cannot be decompressed via 'gzip -d' it on hp-ux?

One more thing is that my name service is not configured yet on the hp-ux box. What server would you advise me? I tried with a DNSUPGRADE depot file but there was a permission and depot location problem when using swinstall. Is it necessary to use a depot file on hp-ux?

Thank you very much
Mel Burslan
Honored Contributor

Re: Web access

make sure you can resolve the name of the server in your /etc/hosts file both simple and FQDN form to make swinstall happy.

But since you are talking about accesing internet, you will need to setup a name resolution system to resolve internet bound names to their ip addresses.

So, edit your /etc/resolv.conf and /etc/nsswitch.conf files (man can tell you a lot about these files) and insert proper entries.
________________________________
UNIX because I majored in cryptology...
Marco A.
Esteemed Contributor

Re: Web access

hello IVI,

Yes, I'm using XP like you.. I downloaded the file to my desktop, then using ftp I sent the file to my /tmp directory.

Now log in to the server and extract the file.
#cd /tmp
#gzip -d wget-1.10.2-ia64-11.23.depot.gz

Now you will see a file like this..

wget-1.10.2-ia64-11.23.depot

Now, you need to execute the following command. :


#swinstall -s /tmp/wget-1.10.2-ia64-11.23.depot

Then, that will start the swinstall "wizard" , select the item "wget" by using the , go to actions, and then install...

That must work for you.

Let us know your results,

MArc'o
Just unplug and plug in again ....
lVl_1
Super Advisor

Re: Web access

* I'm still getting the error:

# pwd
/
# ls | grep wget
wget-1.10.2-hppa-11.23.depot.gz
# gzip -d wget-1.10.2-hppa-11.23.depot.gz

gzip: wget-1.10.2-hppa-11.23.depot.gz: invalid compressed data--crc error

gzip: wget-1.10.2-hppa-11.23.depot.gz: invalid compressed data--length error

It may be a wrong version; I'll check. What is the command to get detailed information about an hp-ux system please?

* I am going to configure the resolv.conf and nsswitch.conf files. I will have no fqdn to specify cause the box is not part of any domain. Should it work anyway? Or maybe I should set a domain first. How?

Marco A.
Esteemed Contributor

Re: Web access

did you download the ftp version file ...? mine is working right know, actually from the html server is bad.
Just unplug and plug in again ....
Mel Burslan
Honored Contributor

Re: Web access

IVI,

The error message you are getting means, you could not get the whole file for some reason. Did you try to download it directly to your hpux box or did you download it to windows box and then transferred it to the hpux system ?

Whichever is the way you used, the transfer to hpux system, did not finish completely. If you can summarize command-by-command what you did, it may help us understand where you might have gone wrong. One thing comes to mind is, if you selected binary mode before downloading it from ftp site ? Again step by step account of what you did is the best way to start solving the problem.
________________________________
UNIX because I majored in cryptology...
lVl_1
Super Advisor

Re: Web access

Okay. So here is what I did:
I went to the link Marc'O provided.
Then clicked on the ftp version of the following file:
wget-1.10.2-hppa-11.23.depot.gz
I saved it in the FileZilla directory of my windows box.
From the cli I connected to the hp-ux box after having moved to the FileZilla directory.
There I 'put' the downloaded file; I actually got this output:
ftp> put wget-1.10.2-hppa-11.23.depot.gz
200 PORT command successful.
150 Opening ASCII mode data connection for wget-1.10.2-hppa-11.23.depot.gz.
226-WARNING! 2115 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Transfer complete.
ftp: 628335 bytes sent in 1.15Seconds 545.90Kbytes/sec.

Something went wrong at this step.

Do you know an hp-ux command that provides more details on the systm than 'uname -a'? (platform information...?)

Thank you very much 4 ur availability
Marco A.
Esteemed Contributor

Re: Web access

IVI, check this out ..

Run the follwoing command .:!


First run the model command to see what server do you have.

#model
ia64 hp server rx7620
That rx means that I have an Itanium box, in your case is appears a PA#### you need to take the PA-RISC versions.

#uname -a
HP-UX mtlrc139 B.11.23 U ia64 423789787 unlimited-user license

That is just for your information because the file is the same for all the versions, don't worry about it.


download this one.:

http://hpux.connect.org.uk/hppd/cgi-bin/redirect?hpux/Gnu/wget-1.10.2/wget-1.10.2-ia64-11.23.depot.gz

Regards,

MArco
Just unplug and plug in again ....
Marco A.
Esteemed Contributor

Re: Web access

Good morning IVI,

Look at this..

***File may not have transferred correctly.***

Try to use ascii before the transfer.

Or, go right here ...

http://www.download.com/SmartFTP/3000-2160-10028635.html?part=dl-SmartFTP&subj=dl&tag=button

And download this cool ftp client for your XP, and try to use it to your server, it works very good.

Marco
Just unplug and plug in again ....
lVl_1
Super Advisor

Re: Web access

Hi Marc'O The model com gives me only the following info:
# model
9000/800/rp3440

I do not know the platform of the server (pa risc?)
Mel talked about enabling binary mode before downloading the ftp file. how am I supposed to do it?
I am cfiguring the name service while.

10x
Marco A.
Esteemed Contributor

Re: Web access

that's correct, you have a RP (rack-mount PA-RISC).

But, then try to run the other ftp software...and put the file in your server.
Just unplug and plug in again ....
lVl_1
Super Advisor

Re: Web access

As for the ascii mode, it has not solved the transfer pb; look:

ftp> ascii
200 Type set to A.
ftp> put wget-1.10.2-hppa-11.23.depot.gz
200 PORT command successful.
150 Opening ASCII mode data connection for wget-1.10.2-hppa-11.23.depot.gz.
226-WARNING! 2115 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Transfer complete.
ftp: 628335 bytes sent in 1.06Seconds 591.65Kbytes/sec.

If I want to use the other ftp sw, should I only have to download it to the windows box and use it as I am using FileZilla right now?
Marco A.
Esteemed Contributor

Re: Web access

that's correct IVI ... , actually test if the file you have is good by triying to un-compress it in your computer, using winzip, or winrar, the product that you have.
Just unplug and plug in again ....
lVl_1
Super Advisor

Re: Web access

Marc'O, I downloaded the wget-1.10.2-hppa-11.23.depot.gz file from ftp://hpux.connect.org.uk/hpux/Gnu/wget-1.10.2/
to the win box.
Then I unzip it to get the .depot file.
This one I ftp to the hp-ux box and got the same error as before.
Anyway I used the swinstall -s command that opened the swinstall GUI and displayed the following error:
"hostname:/path to the depot file": You do not have the required permission to perform this operation.
I had already got this error when trying to install a DNS depot file. I am root on the server.
When I use 'swacl -l root' to check the permissions I get the error that I do not have the test or controp permission to be able to access the root acl.
The identity information used by Software Depot is:
# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)

What should I do to be able to install depot files?