Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I live outside the US, but have a server in the US to access domains which are limited to US citizens via ssh dynamic port forwarding. It is somewhat troublesome though, to always log into the server via ssh. I would rather want my server to do the forwarding for me.

For example if I type in mydomain.com/youtube my server should build a connection to youtube.com for me. So when I'm accessing youtube, I'm accessing through my server.

How would I go about this problem?

share|improve this question

migrated from serverfault.com Sep 27 '12 at 22:43

This question came from our site for professional system and network administrators.

    
Sounds like you want to change the behavior of your browser, presumably from your own personal machine. Voting to move to SU. –  mfinni Feb 7 '12 at 18:59

1 Answer 1

up vote 2 down vote accepted

1 - Install openvpn: http://openvpn.net/index.php/open-source/documentation/howto.html

2 - Install a proxy such as squid

3 - Configure your browser to use that proxy

2A - Alternatively you can push routes through openvpn for these IP ranges you want to access through the openvpn connection. In that case all traffic on your computer that tries to access these IP ranges will use the openvpn connection.

It will appear as if your traffic is coming from the IP where the openvpn server resides. Works flawlessly. :-) The traffic of course is encrypted at least from the openvpn server to your home. Your ISP and anything else in between will not be able to figure out what the heck you're doing in case they felt a need to.

Works well also when "on the road". If you're in a hotel which blocks openvpn udp port 1194 you can configure port 80 for example.

Edit: I meant for steps 1, 2 and 3 to be done as one solution. Although just step 2 could work as well, less the benefit of encryption that openvpn provides.

You can try to use stunnel to encrypt squid. I have used it successfully to enable encrypted squid traffic and password exchange.

share|improve this answer
    
Thanks. I really like the second approach. Is there any link, paper which you could recommend me reading? –  cherrun Feb 7 '12 at 20:13
    
The link at the first point is the best place to start. if you have specific questions feel free to ask. I have worked with openvpn quite a bit. –  aseq Feb 7 '12 at 20:28
    
Well, I installed squid and am using basic authentication. Now I'd like to use either SSL/TLS or another way to secure the transportation of my cleartext password. Any suggestions? Maybe I'll just open up a new thread. –  cherrun Feb 7 '12 at 23:14
    
Well, if you connect to squid using openvpn then it's encrypted to begin with. However if you are just using squid on its own take a look at the "stunnel" package (in debian). That seems the only practical way I found to encrypt squid traffic. –  aseq Feb 8 '12 at 0:52

Your Answer

 
discard

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