# Capistrano and vpn secured svn

**URL:** <https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303>\
**Category:** Deployment\
**Created:** [January 25, 2007, 12:01am UTC](https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303 "2007-01-25T00:01:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [January 25, 2007, 12:01am UTC](https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303/1 "2007-01-25T00:01:01Z")

</div>

So, I would really like to be using Capistrano but I’m running into a  
problem when I cap deploy. It looks like cap will try and connect to my  
subversion repo but its behind a windows VPN. The production server is  
centos and I’m looking at vpn tunneling options but wondered if anyone  
here  
has done this before.

Thanks guys!

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [January 25, 2007, 12:35am UTC](https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303/2 "2007-01-25T00:35:06Z")

</div>

> So, I would really like to be using Capistrano but I’m running into a  
> problem when I cap deploy. It looks like cap will try and connect to my  
> subversion repo but its behind a windows VPN. The production server is  
> centos and I’m looking at vpn tunneling options but wondered if anyone here  
> has done this before.

I haven’t done it for this, but for other things… perhaps configure  
the  
SSH command that capistrano uses to setup a tunnel so that capistrano  
tries to connect to a local svn repository on some other port that  
triggers the tunnel back to your real svn repo?

If cap can’t do it directly, you could certainly start the tunnel before  
hand…

That seems like it would be the easiest way to do it.

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [January 25, 2007, 12:51am UTC](https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303/3 "2007-01-25T00:51:07Z")

</div>

Thanks for input Philip!

I can live with starting the tunnel manually and automating later on  
—can  
you (or anyone here) recommend a good command line based vpn tunneling  
client?

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [January 25, 2007, 3:35am UTC](https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303/4 "2007-01-25T03:35:26Z")

</div>

You could also use SVK or svnsync to mirror your repo outside of the  
VPN…

---

<div class="post-metadata">

**Author:** ![Brian\_LeRoux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@Brian\_LeRoux](https://www.ruby-forum.com/u/Brian_LeRoux)\
**Post date:** [January 25, 2007, 5:43pm UTC](https://www.ruby-forum.com/t/capistrano-and-vpn-secured-svn/83303/5 "2007-01-25T17:43:59Z")

</div>

> Thanks for input Philip!
> 
> I can live with starting the tunnel manually and automating later on —can  
> you (or anyone here) recommend a good command line based vpn tunneling  
> client?

Hrm… I meant use ssh’s built in tunneling (port forwarding)…

-R port:host:hostport  
Specifies that the given port on the remote (server) host is to be  
forwarded to the given host and port on the local side. This works by  
allocating a socket to listen to port on the remote side, and whenever a  
connection is made to this port, the connec- tion is forwarded over the  
secure channel, and a connection is made to host port hostport from the  
local machine. Port forward- ings can also be specified in the  
configuration file. Privileged ports can be forwarded only when logging  
in as root on the remote machine. IPv6 addresses can be specified with  
an alternative syntax: port/host/hostport.

So, something like…

ssh -R 12345:localhost:3690 my\_production\_server

and then configuring things so that on your production server you’d  
connect to: svn://127.0.0.1:12345/path/to/repo

-philip
