Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have followed some simple instructions in setting up a SVN server on my windows server at home. It insolve installing the svn binary and setting it up as a service. In my LAN I tried access my svn server at the svn port and everything works fine. However is it safe to access my server from my office? I don't think the traffic (both the code and my password) it encypted over the network to my ssn server, is that correct?

share|improve this question

migrated from stackoverflow.com Aug 24 '09 at 15:57

This question came from our site for professional and enthusiast programmers.

closed as off topic by Zypher Jan 20 '12 at 17:54

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Do you have a static IP? That would be my initial question after reading this as if you don't, that may be worth solving first as well as how to change your firewall's configuration to allow the traffic through. –  JB King Aug 24 '09 at 15:42

5 Answers 5

If you want a secure tunnel to your SVN server (running the svnserve daemon, not Apache) then you want to either: set up a ssh tunnel to access your home server, or set your firewall to only accept connections from known IP addresses you will be using in the office.

If you use the IP technique to block all other IPs, bear in mind the IP you see in your server might be the office NAT's IP address (ie everyone inside the office has a private IP but there is only 1 IP that is seen by the outside world, the mapping is managed by a NAT router)(this is ok if you want everyone in your office to connect too though).

Tunnelling svn over ssh is a common technique. Here's a tutorial to get it set up.

share|improve this answer

Whether or not the traffic is secure depends on if you're accessing it over HTTPS or not.

share|improve this answer
    
I thought I am access svn as a server, it doesn't go through a web server I don't think –  erotsppa Aug 24 '09 at 15:47
    
it doesn't. It only goes over https if you've installed it under Apache. –  gbjbaanb Aug 24 '09 at 15:48
    
Ah, true. It's so widespread that I forget not everyone uses the Apache module. –  HanClinto Aug 24 '09 at 15:55
    
If I install it with the apache module, does it automatically uses https? Or do I have to purchase some SSL certificate? –  erotsppa Aug 24 '09 at 16:02
1  
You can generate your own SSL certificate. You don't have to buy one. –  Laura Thomas Aug 24 '09 at 18:02

I have a mod_dav_svn loaded into Apache, and using AuthType Basic to authenticate against a local user/pass file. The file is 640 with root:apache owner. This isn't enough for real security, so I have it wrapped in SSL with SSLRequireSSL directive. This way I can use my SVN repos either through a client (TortoiseSVN worked with a https://... connection, btw) or a SSL enabled browser. This gives me a great flexibility while maintaining reasonably high level of security.

share|improve this answer

You can also (if it's for your only needs) encrypt the connection by create a self-generated SSL certificate and under Apache add the following directive

SSLCertificateFile /yourfile

SSLCertificateKeyFile /yourkey

And enable the Listen 443 directive. Thus your connection will be more secure

share|improve this answer

I like Apache and ssl (just like Marcin describes), then add a very aggressive firewall that only allows connections from a short list of ip numbers or a range of ip numbers (that you are connection from).

That way you lower the noise as well, and takes away most script kiddies....

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.