configuring SSH to act as a vpn tunnel

This is a discussion on configuring SSH to act as a vpn tunnel within the Linux Security forums, part of the System Security and Security Related category; Maybe I am asking for a miracle but, I would like to configure a web browser to use a proxy ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-10-2005
Christian Bongiorno
 
Posts: n/a
Default configuring SSH to act as a vpn tunnel

Maybe I am asking for a miracle but, I would like to configure a web
browser to use a proxy on a remote network. The trick is, due to port
blocking rules the proxy is not accessible outside the network -- which
defeats my plans.

So, what I would like to do is somehow configure firefox to use the ssh
tunnel I establish and connect to the proxy on that remote box (that I
will start).

Before anyone just says "Export the display back for a remote FF
session" I respond:

Yes, I can do that and currently am. However, the latency and BW usage
renders it difficult to use.

so, I guess the general question is: Can I use ssh as a generic vpn??

Christian
Reply With Quote
  #2 (permalink)  
Old 03-10-2005
Tauno Voipio
 
Posts: n/a
Default Re: configuring SSH to act as a vpn tunnel

Christian Bongiorno <""@ lastname> wrote:
> Maybe I am asking for a miracle but, I would like to configure a web
> browser to use a proxy on a remote network. The trick is, due to port
> blocking rules the proxy is not accessible outside the network -- which
> defeats my plans.
>
> So, what I would like to do is somehow configure firefox to use the ssh
> tunnel I establish and connect to the proxy on that remote box (that I
> will start).
>
> Before anyone just says "Export the display back for a remote FF
> session" I respond:
>
> Yes, I can do that and currently am. However, the latency and BW usage
> renders it difficult to use.
>
> so, I guess the general question is: Can I use ssh as a generic vpn??
>
> Christian


It works, but due to the complexity, it's slow.

For generic VPN, my vote to OpenVPN,
<http://sourceforge.net/projects/openvpn/>.

It runs on both Windows and all kind of UNIXish
systems, including Linux.

There is a theoretical problem of running TCP on top
of TCP, like SSH and many other VPN tunnels do.
OpenVPN can run on top of UDP, where the problem
does not exist.

--

Tauno Voipio
tauno voipio (at) iki fi

Reply With Quote
  #3 (permalink)  
Old 03-10-2005
James Knott
 
Posts: n/a
Default Re: configuring SSH to act as a vpn tunnel

Christian Bongiorno wrote:

> so, I guess the general question is: Can I use ssh as a generic vpn??
>


While many apps can run over ssh, why not just use a vpn? I use OpenVPN,
which can be configured to use any udp or tcp port (udp preferred).

Reply With Quote
  #4 (permalink)  
Old 03-10-2005
Andrew Schulman
 
Posts: n/a
Default Re: configuring SSH to act as a vpn tunnel

> Maybe I am asking for a miracle but, I would like to configure a web
> browser to use a proxy on a remote network. The trick is, due to port
> blocking rules the proxy is not accessible outside the network -- which
> defeats my plans.
>
> So, what I would like to do is somehow configure firefox to use the ssh
> tunnel I establish and connect to the proxy on that remote box (that I
> will start).


If you're planning to run the proxy server on the remote host just to
forward your connections from work, then don't-- there's a simpler way.
Set up a "dynamic port forward" in the client invocation, e.g. -D1080.
This will cause ssh to act as a local SOCKS proxy. SOCKS packets sent
to localhost:1080 will be forwarded over the encrypted channel to the
ssh server, which will unwrap them, send them out to the net, and
forward replies back through the tunnel to the client.

Now just tell Firefox to use localhost:1080 as a SOCKS server. Be sure
to specify SOCKS v5, since this will cause DNS queries to be resolved
remotely instead of locally.

Otherwise, if you're planning to have the remote proxy server running
anyway, then you can just do as Dave suggested-- forward
localhost:someport to remotehost:proxyport, and tell Firefox to use
localhost:someport as a proxy server.

--
To reply by email, replace "deadspam.com" by "alumni.utexas.net"
Reply With Quote
  #5 (permalink)  
Old 03-10-2005
spam@steve.org.uk
 
Posts: n/a
Default Re: configuring SSH to act as a vpn tunnel

Christian Bongiorno <"<firtname>"@ wrote:
> Maybe I am asking for a miracle but, I would like to configure a web
> browser to use a proxy on a remote network. The trick is, due to port


> blocking rules the proxy is not accessible outside the network --

which
> defeats my plans.


If you can access a remote machine via SSH you can use that to
forward requests to the proxy server, using OpenSSH's tunnels.

For example I have a host I can connect to from work, and I simpl
run:

ssh -L 8080:localhost:8080 username@my.home.gateway

This forwards all traffic sent to the local machine on port 8080
to port 8080 on the home gateway which is running squid.

Once this is done inside your browser you simply set your proxy
to b localhost:8080 and all will work correctly.

> so, I guess the general question is: Can I use ssh as a generic vpn??


You can (google for ppp over ssh) but it's slow and incurs a penalty
in
speed.

Instead you should simple use SSH's tunnel facilities, which will be
perfect for your problem. (And the proxy server doesn't even have to
run on the host you're SSH'ing to, so long as the two hosts can see
each other all will be well).

Steve
--
# Debian System Administration
www.debian-administration.org/

Reply With Quote
  #6 (permalink)  
Old 03-11-2005
James Knott
 
Posts: n/a
Default Re: configuring SSH to act as a vpn tunnel

Dave {Reply Address in.sig} wrote:

> Also a good trick if you're using a wireless connection at your local
> coffee shop or elsewhere, ssh to home and browse/read mail/news via there,
> then it's a lot harder for people to see what you're doing because all
> they get are encrypted packets on an ssh link.


I did just that last week, except with a vpn. I was in a coffee shop, that
just started offerring WiFi and it's free until April. So, I forced myself
to drink a "Chocolate Lover's Latte, vanilla fudge brownie", so that I
could try out the WiFi service. ;-)

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0