Subversion on a virtual machine using port forwarding

Since I couldn’t for the life of me figure out how to get subversion and svnserve working on OS X Leopard I decided to set it up on a virtual machine running linux instead. This turned out to be an even greater idea than I first imagined. My original idea was to set up this VM with bridged networking, and just connect to it as any other server running svnserve. Unfortunately my dns/dhcp server integrated with my dsl-modem/router got confused by doing it this way, so I had to think of something else.

The solution was NAT on the VM and port forwarding through ssh. When choosing NAT for the VM no other machines than the VM’s host can connect to it, so I had to do some sort of forwarding. I now connect to my VM host through ssh which then forwards the svnserve port 3690 from the VM to my client. This works beautifully. And the best thing about it is that I don’t have to change settings for the svn repository in Eclipse when connecting from outside my lan. It will allways be svn://localhost/repos, of course now I have to use ssh also from the inside, but that’s not a problem.

So for this weekend’s mission on “porting” my iMac from linux to OS X Leopard: Mission accomplished!

The final result is a bit different than what i first had in mind, but all in all I am very pleased.

  • Twitter
  • Facebook
  • Digg
  • Google Bookmarks
  • StumbleUpon
  • FriendFeed

Leave a Reply

Your email address will not be published. Required fields are marked *

6 + = twelve

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>