<p>I need to access a <strong>SVN</strong> repository from home, that runs under the IP <code>192.168.0.10</code> in the work network.
I can establish a <code>SSH</code> tunnel to my localhost.
Now I have to map <code>192.168.0.10</code> in a way, that instead <code>127.0.0.1</code> is accessed.
Does anybody know a way to do this under Windows?</p>

[{'answer_id': 81092, 'author': 'jwanagel', 'author_id': 15118, 'author_profile': 'https://Stackoverflow.com/users/15118', 'pm_score': 0, 'selected': False, 'text': '<p>Can you reference the DNS name instead?  You can override the IP address for a DNS name in your hosts file (C:\\windows\\system32\\drivers\\etc\\hosts).</p>\n'}, {'answer_id': 81096, 'author': 'Matthias Kestenholz', 'author_id': 317346, 'author_profile': 'https://Stackoverflow.com/users/317346', 'pm_score': 0, 'selected': False, 'text': '<p>I\'m not sure that\'s possible at all. What you could do would be to reference a DNS name instead. You can change the IP the DNS name points to using your <a href="http://en.wikipedia.org/wiki/Hosts_file" rel="nofollow noreferrer">hosts file</a>.</p>\n'}, {'answer_id': 81101, 'author': 'prakash', 'author_id': 123, 'author_profile': 'https://Stackoverflow.com/users/123', 'pm_score': 0, 'selected': False, 'text': '<p>edit your hosts file located at <code>%SystemRoot%\\system32\\drivers\\etc\\</code></p>\n'}, {'answer_id': 81130, 'author': 'Dominik Grabiec', 'author_id': 3719, 'author_profile': 'https://Stackoverflow.com/users/3719', 'pm_score': 0, 'selected': False, 'text': "<p>As I understand the question is that you have a subversion repository checked out on a laptop (or some other computer) that you checked out at work using the ip address 192.168.0.10, and now you're at home and want to use it.</p>\n\n<p>Personally I wouldn't try any fancy network reordering (or modifying the hosts file) but just use the SSH tunnel to check out a fresh copy of the repository on the machine again. So that you'll be checking the source out from the 127.0.0.1 address. Then if you need to move changes over you could use patches between the two checked out copies. Granted it's not the most ideal solution but it will get you going quickly without messing about too much.</p>\n\n<p>Though a better solution would be to convince work to allow access to the repository (with proper passwords, authentication, SSL etc) using a nicer method, say apache with dav_svn/webdav.</p>\n\n<p>If they don't go for that then try and get them to provide a VPN so that you can continue to work with the repository using the work IP address.</p>\n"}, {'answer_id': 81139, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Why don't you just access svn via 127.0.0.1?  Surely this would be a better solution?</p>\n\n<p>You're faced with several issues here, if I understand correctly.  There's only one way you can make this work, that is to have your home machine have an address of 192.168.0.10.  Then, you specify the ssh local address with 192.168.0.10 instead of 127.0.0.1.</p>\n\n<p>The remote ssh connection will also by 192.168.0.10.</p>\n\n<p>E.g., ssh -l work_user -L 192.168.0.10:svn:192.168.0.10:svn work_ssh_host</p>\n\n<p>This syntax is possible with OpenSSH.</p>\n\n<p>This is all if I understand your situation correctly.</p>\n\n<p>A more elegant solution is to use OpenVPN, and route connections over the VPN.</p>\n"}, {'answer_id': 81241, 'author': 'Kasprzol', 'author_id': 5957, 'author_profile': 'https://Stackoverflow.com/users/5957', 'pm_score': 2, 'selected': False, 'text': '<p>TortoiseSVN allows you to relocate your repository</p>\n\n<p><a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-relocate.html#tsvn-dug-relocate-dia-1" rel="nofollow noreferrer">http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-relocate.html#tsvn-dug-relocate-dia-1</a>:</p>\n\n<blockquote>\n  <p>If your repository has for some reason changed it\'s location (IP/URL). Maybe you\'re even stuck and can\'t commit and you don\'t want to checkout your working copy again from the new location and to move all your changed data back into the new working copy, TortoiseSVN → Relocate is the command you are looking for. It basically does very little: it scans all entries files in the .svn folder and changes the URL of the entries to the new value.</p>\n</blockquote>\n\n<p>Or you can use svn command:</p>\n\n<blockquote>\n  <p>svn switch --relocate From_URL To_URL</p>\n</blockquote>\n'}, {'answer_id': 161329, 'author': 'Roger Lipscombe', 'author_id': 8446, 'author_profile': 'https://Stackoverflow.com/users/8446', 'pm_score': 2, 'selected': False, 'text': '<p>When you\'re at work, edit your HOSTS file to have svn = 192.168.0.10; when you\'re at home, edit it to have svn = 127.0.0.1, and then access it, in both by using \'svn\' as the server name.</p>\n\n<p>Alternatively, use the "svn switch --relocate" command to change the repository location when you need to.</p>\n'}, {'answer_id': 316479, 'author': 'Schalk', 'author_id': 26700, 'author_profile': 'https://Stackoverflow.com/users/26700', 'pm_score': 0, 'selected': False, 'text': '<p>I think I have had the same situation before, I will have to find what the exact configuration though.</p>\n\n<p>You can start by looking at <a href="http://portableapps.com/apps/internet/putty_portable" rel="nofollow noreferrer" title="PuTTY Portable">PuTTY Portable</a>, it supports SSH and you can "redirect" a local IP to a remote IP.</p>\n\n<p>As far as I can remember, when you run PuTTY you can:</p>\n\n<ol>\n<li>First specify you local address and port (this will be where you will be pointing your SVN client, e.g. Tortoise)</li>\n<li>Then go to Connection->SSH->Tunnels-> specify your source port to redirect from (same as above), then specify the destination IP and port and click add</li>\n</ol>\n\n<p>I think that should be it, it has been a while since I have done it.</p>\n'}]
['https://Stackoverflow.com/questions/81073', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']