Accessing SVN Server remotely

1

So here I'm after investing days of effort into it. I have SVN Apache Edge running on my machine on top of Apache. I want to access it (check-out/check-in) from a remote machine. My machine is behind a normal router and has a dynamic IP. Here's what I have achieved:

  1. Registered my machine using a DDNS service and got a URL.
  2. Enabled port forwarding (port 8085 forwarded to my machine's port 80) on the router.
  3. I'm pretty sure SVN/Apache are listening on port 80, becuz I can type http://localhost in the browser (on my machine) and get a list of repo directories.
  4. But when I type http://My_DDNS_URL:8085 on a remote machine, it takes almost forever waiting for a response from my machine and ends up in time-out (I think).
  5. I can ping both my dynamic IP address as well as my URL (assigned by DDNS service) from the remote machine.

What am I doing wrong here?

dotNET

Posted 2013-05-07T14:45:26.323

Reputation: 481

Is port 8085 being forwarded through the router to the target server? – Ƭᴇcʜιᴇ007 – 2013-05-07T16:06:58.753

Is there a reason you are using SVN? Mercurial, Git etc. are good pieces of software and are easier to share changes whether using a free hosted service or running a server yourself. – syserr0r – 2013-05-07T16:18:44.207

I have been working with SVN for quite some time now. Switching to another versioning system may involve some learning curve, which I want to avoid at this point in my running project's schedule. – dotNET – 2013-05-07T17:19:21.890

Answers

1

The problem could be in one of several places. The three most likely are:

  • Apache is only listening on localhost (instead of, say, 192.168.1.x or 0.0.0.0)
  • The port-forwarding isn't working/setup properly (e.g. port 8085 is forwarded to 192.168.1.12 yet your PC has changed to 192.168.1.14 since it last rebooted)
  • Your modem/router is not doing NAT-loopback (normally if you want to access your service from inside your network you connect to http://192.168.1.x and if you are outside you use http://1.2.3.4 -- NAT-loopback redirects requests from inside the network to its external address back into its internal address [e.g. to 1.2.3.4 into 192.168.1.x] (so the external address still works internally).

syserr0r

Posted 2013-05-07T14:45:26.323

Reputation: 126

Thanks. I also found that I can do http://My_DDNS_URL (without the port number) from the remote machine and that would take me to the router's home page (the same page that I can access by typing 192.168.1.1 on my local machine). Does that help in eliminating any of the above possibilities? – dotNET – 2013-05-07T15:36:51.320

It sounds as if there is no NAT-loopback feature on your router (or it isn't enabled). From what I understand it is not very common. The easiest way to check is to get somebody outside your network to connect -- if they can (and you can't) then it's NAT-loopback issue. NAT-loopback is more of a convenience feature; really you should be connecting to localhost (or whatever IP/hostname your computer has) when you are inside your network. – syserr0r – 2013-05-07T16:11:59.627

As a very basic test, if you don't have access to a server or computer on an outside network, you can go to something like ShieldsUP!, enter the external port number (i.e. 8085) and click User Specified Custom Port Probe. It won't tell you what is listening (i.e. Apache) but it will tell you if outside people can connect

– syserr0r – 2013-05-07T16:15:33.737

ShieldsUP! tells me that my port 8085's status is OPEN with unknown protocol/application. How does that help? – dotNET – 2013-05-07T17:14:44.200

I have also confirmed by reading the conf file of Apache server that it is listening on port 80 on all interfaces (by comparing it to the doc link you provided above). So #1 is not the issue here. – dotNET – 2013-05-07T17:35:00.727

#2 is also not a problem here. I'm using static IP in my LAN configuration and port forwarding is configured against that IP in the router. – dotNET – 2013-05-08T06:56:37.083

Got it working. It is apparently becuz of #3 above. I can access my repos from outside, but not inside the network. So I guess my router doesn't support NAT-loopback. I'll mark this as answer. – dotNET – 2013-05-08T08:11:37.123