12

How can I configure TortoiseSVN to connect to a SVN server behind a corporate firewall from home?

This is the question I'm having a hard time finding an answer to. Here's what I DON'T have:

  1. Official VPN access to the corporate intranet.
  2. Control over the SVN server.
  3. Any control over the intranet.
  4. Cooperation from the IT department.

Here's what I DO have:

  1. Full control over my computer at my desk at the office.
  2. Willpower

This is a shot at what I tried, and seem to be unsuccessful at (names of people and places and machines have been changed to protect the innocent):

Sweet network diagram of fail

  1. I am using Wippien to set up a zero configuration VPN from my home computer (NG-ATHOME) to my work computer at my desk. This works, I have total network access to and from both machines.
  2. I have OpenSSH for Windows running on NG-WORKBOX.
  3. I have PuTTY on NG-ATHOME connecting to NG-WORKBOX to tunnel dynamically over port 1080. The SOCKS proxy is working, as I can verify that with any web browser. I can confidently say that this is not the problem in the scenario.
  4. I am using TortoiseSVN on NG-ATHOME configured to use a proxy on 127.0.0.1:1080. When I try to hit "svn://NG-SOURCE/PonyRepository", I get error: cannot connect to host. I can ping NG-SOURCE fine.

Why doesn't SVN work?

Hmm, I have a suspicion that SVN does not like SOCKS. Anyone have a suggestion?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
snicker
  • 6,080
  • 6
  • 43
  • 49
  • 6
    +1 for "LOL BAI FIREWALL" – Urda Mar 03 '10 at 18:19
  • 7
    Perhaps there is a reason your employer does not want this to happen. There may even be legal issues. Be careful. – basszero Mar 03 '10 at 19:00
  • @basszero: While I appreciate your concerns, I *know* that in my particular situation, that is not the case. But I do agree with you, for others who may be reading this message. – snicker Mar 03 '10 at 19:07
  • Cheers. I don't want to be "that guy" (especially as this question is starting to age), but you could consider moving to a distributed version control system like Mercurial, which would allow you to make local commits without needing to access the server. I thought people looking at this question might find this suggestion helpful. – Aaron Newton Oct 15 '11 at 05:50

3 Answers3

10

Have you tried forwarding directly to port 3690 on the target machine instead of using socks?

ssh -L 3690:remote:3690
svn info svn://localhost/blahblahblah
basszero
  • 29,624
  • 9
  • 57
  • 79
0

If you have a web server installed on the computer the repository is installed on you can actually use svn on the standard http port 80 alongside the web server using the apache svn module. Just download and activate the required modules:

LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
# external modules
LoadModule dav_svn_module ../svn/bin/mod_dav_svn.so
LoadModule authz_svn_module ../svn/bin/mod_authz_svn.so

...

<Location /svn >
    DAV svn
    SVNParentPath D:\Repositories
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile D:\Repositories\permisiuni.conf
    Require valid-user
    SVNAdvertiseV2Protocol Off # prevents Subversion E160013: '/svn/xxx/!svn/me' path not found* error
</Location>

Of course, you'll have to create permisiuni.conf containing users and passwords in the following format:

username1:password1
username2:password2
username3:password3
Liviu Gelea
  • 361
  • 2
  • 9
0

If someone is still interested here is a link to a tutorial showing how to set up a tunnel to bypass a firewall.

http://problemssol.blogspot.com/2010/12/ssh-tunelling-to-reach-svn-repository.html

karolx
  • 508
  • 4
  • 9