Link to home
Start Free TrialLog in
Avatar of Eric Donaldson
Eric Donaldson

asked on

Script

Hi,

I need a script to bring up a website to test on port 80 to my local pc, website is on a server remote.  I would need to use port forwarding for this, is there an easy way to do this?  My local computer is redhat and remote is redhat.    I need to be able to test on my local web browser.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

That doesn't make any sense.  Why aren't you going directly to the website in your browser?
Avatar of Eric Donaldson
Eric Donaldson

ASKER

Because this is a test server and the server is CLI only.  There is no dns yet
If it is CLI only, then the only browser that might be available to you is Lynx which is a text browser, no images.
Do you have SSH access to the remote system?

If so you can use an SSH connection to forward an local port to a remote systems port.

ssh -L 8888:remoteserver.com:80 user@remoteserver.com

Then you can point your browser at localhost:8888 and connect to the remote systems apache/web server.
So I connect with my SSH client in this format:  ssh -L 8888:remoteserver.com:80 user@remoteserver.com

Then open browser with this:  localhost:80?  I notice you have 8888
ASKER CERTIFIED SOLUTION
Avatar of Steven Vona
Steven Vona
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, so would it be possible to also use local dns using domain name too?  Right now I cannot edit the host file on the pc though.
Correct, you would be able to use DNS from the client computer.  If DNS has been configured for that domain name.
This fixed my issue
This fixed the issue
Please assign points and close the question if you are happy with the answer.