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?
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.
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.