Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have configured PHPMyAdmin on an Ubuntu Server to be accessible only from 127.0.0.1.

I am then trying to access it through an SSH tunnel, but I still obtain the Forbidden error.

When using SSH on the server, I can use Lynx to go to localhost/phpmyadmin; so I know it's working at least there.

The command I've used for the tunnel is ssh -L 8080:mysite.com:80 localhost.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Your tunnel needs to be,

ssh -L 8080:localhost:80 yourserver

and you run that command from the remote machine. It creates a tunnel from you to yourserver, via port 8080 at your end. On yourserver it then shoves anything it sees into localhost on port 80.

Your command was getting it to send traffic to port 80 on your servers mysite.com address (which probably isn't 127.0.0.1)

share|improve this answer
    
ah, great!!!! that was it! thanks a lot!! –  Yusuf Jul 9 '11 at 21:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.