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 a webserver with a htaccess rule that permits only contact to a webservice from 127.0.0.1 (I cannot change this). I already configured putty to make a tunnel to that webserver and when I enter localhost:port in my browser I see the page hosted there. But to access the webservice it has to be as if I come from 127.0.0.1. How can I do this?

share|improve this question
    
If you have an ssh tunnel open, you come from 127.0.0.1 –  Thomas Berger Oct 12 '12 at 20:14
add comment

1 Answer

I set up a tunnel and connected to my webserver using it. I noticed that the connections were logged as coming from ::1 which is the IPv6 'localhost'. If you allow from 127.0.0.1 rather than localhost then these will be blocked.

You should be able to solve this by changing the tunnel definition in putty. Instead of using localhost:80 as the destination use 127.0.0.1:80.

share|improve this answer
add comment

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.