Page 1 of 1
OpenVPN SSH Tunnel
Posted: Wed Nov 09, 2011 10:13 pm
by zakazak
Hi, so after 4 hours I finally managed to install OpenVPN on my deiban 6 server.
I can connect to it via the OpenVPN GUI in Windows 7.. but then I won't be able to use the internet anymore (no internet access after connecting to the VPN).
Okay not a big deal.. actually I wanted to use the VPN only for mail & browser... so I tried installing the SSH tunnel like this:
http://www.classy.dk/hacks/archives/002287.html
The command I used for starting the tunnel:
ssh -L1194:127.0.0.1:1194 root@my-server-ip/domain
When I now enter the server ip + port as proxy in my browser, most sites won't work. E.g. I can use google but as soon as I open a link it is just a blank site.
Thanks
Re: OpenVPN SSH Tunnel
Posted: Thu Nov 10, 2011 10:23 am
by Mimiko
The internet is redirected thru the tunnel by ' push "redirect-gateway def1" ' from OpenVPN server. There is no need for some SSH tunnel. Ever disable redirecting gateway, or configure server to forward packets.
Re: OpenVPN SSH Tunnel
Posted: Thu Nov 10, 2011 12:05 pm
by zakazak
Without the SSH Tunnel I can't use the OpenVPN connection just for firefox? I thought I would use it like a proxy? I don't want to transfer ALL my traffic through the VPN. Just browser/mail/messenger.
Thanks
Re: OpenVPN SSH Tunnel
Posted: Thu Nov 10, 2011 3:47 pm
by Mimiko
Oh, its a diferent matter, not related to OpenVPN. You must figure out how to route trafic for sertain application thru specified interface. Interface may be tun adapter or phisical adapter.
Re: OpenVPN SSH Tunnel
Posted: Thu Nov 10, 2011 5:49 pm
by zakazak
I'm on Win7 Prof.. as far as I know I can't tell applications to use only certain adapters

That's why most tutorials recommend using the OpenVPN as some kind of socks4/5 proxy.
Re: OpenVPN SSH Tunnel
Posted: Thu Nov 10, 2011 8:13 pm
by Mimiko
You are mistken. OpenVPN is not a kind of socks proxy. OpenVPN is tunneling software to bind toghether remote computers and sites. So in your Win 7 to route traffic from certain application to different interfaces, you need to google for a 3rd software which does this.
Re: OpenVPN SSH Tunnel
Posted: Thu Nov 10, 2011 9:30 pm
by zakazak
Thats pretty much what I did.. and google told me SSH Tunnel via OpenVPN (to use it as socks in firefox/ie/thundebrird)

Re: OpenVPN SSH Tunnel
Posted: Fri Nov 11, 2011 8:02 am
by Mimiko
May be it means the other:
1) Setting OpenVPN with remote server (like you did).
2) Setting on remote server a proxy.
3) Setting the browser to use that proxy thru the tunnel.
Re: OpenVPN SSH Tunnel
Posted: Fri Nov 11, 2011 11:53 am
by zakazak
So I would use a proxy which gets encrypted by OpenVPN ? Well that is fine for me too as long as someone tells me how to do that ;D
I simply want to prevent sniffing my browser/mail passwords.
Re: OpenVPN SSH Tunnel
Posted: Fri Nov 11, 2011 12:07 pm
by Mimiko
So I would use a proxy which gets encrypted by OpenVPN ?
Yes, comunnication with proxy will be encripted. After proxy will be as always.
Re: OpenVPN SSH Tunnel
Posted: Fri Nov 11, 2011 1:28 pm
by zakazak
Ye well the communication from the OpenVPN-Server to the website would always be normal?
Do you maybe have a link for me with a guide on how to set up OpenVPN like that? I'm really new to linux/servers :S
Thanks
Re: OpenVPN SSH Tunnel
Posted: Fri Nov 11, 2011 4:03 pm
by Mimiko
You've already set up a tunnel. Just install on OpenVPN server a proxy and use it.