OpenVPN SSH Tunnel

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
zakazak
OpenVpn Newbie
Posts: 7
Joined: Wed Nov 09, 2011 10:10 pm

OpenVPN SSH Tunnel

Post by zakazak » Wed Nov 09, 2011 10:13 pm

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

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: OpenVPN SSH Tunnel

Post by Mimiko » Thu Nov 10, 2011 10:23 am

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.

zakazak
OpenVpn Newbie
Posts: 7
Joined: Wed Nov 09, 2011 10:10 pm

Re: OpenVPN SSH Tunnel

Post by zakazak » Thu Nov 10, 2011 12:05 pm

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

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: OpenVPN SSH Tunnel

Post by Mimiko » Thu Nov 10, 2011 3:47 pm

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.

zakazak
OpenVpn Newbie
Posts: 7
Joined: Wed Nov 09, 2011 10:10 pm

Re: OpenVPN SSH Tunnel

Post by zakazak » Thu Nov 10, 2011 5:49 pm

I'm on Win7 Prof.. as far as I know I can't tell applications to use only certain adapters :o That's why most tutorials recommend using the OpenVPN as some kind of socks4/5 proxy.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: OpenVPN SSH Tunnel

Post by Mimiko » Thu Nov 10, 2011 8:13 pm

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.

zakazak
OpenVpn Newbie
Posts: 7
Joined: Wed Nov 09, 2011 10:10 pm

Re: OpenVPN SSH Tunnel

Post by zakazak » Thu Nov 10, 2011 9:30 pm

Thats pretty much what I did.. and google told me SSH Tunnel via OpenVPN (to use it as socks in firefox/ie/thundebrird) :o

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: OpenVPN SSH Tunnel

Post by Mimiko » Fri Nov 11, 2011 8:02 am

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.

zakazak
OpenVpn Newbie
Posts: 7
Joined: Wed Nov 09, 2011 10:10 pm

Re: OpenVPN SSH Tunnel

Post by zakazak » Fri Nov 11, 2011 11:53 am

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.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: OpenVPN SSH Tunnel

Post by Mimiko » Fri Nov 11, 2011 12:07 pm

So I would use a proxy which gets encrypted by OpenVPN ?
Yes, comunnication with proxy will be encripted. After proxy will be as always.

zakazak
OpenVpn Newbie
Posts: 7
Joined: Wed Nov 09, 2011 10:10 pm

Re: OpenVPN SSH Tunnel

Post by zakazak » Fri Nov 11, 2011 1:28 pm

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

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: OpenVPN SSH Tunnel

Post by Mimiko » Fri Nov 11, 2011 4:03 pm

You've already set up a tunnel. Just install on OpenVPN server a proxy and use it.

Post Reply