2

I have an SVN repo on my server and access it using dynamic IP service https://MyMachine.no-ip.com/svn/etc..

When I connect to it from anywhere I connect successfully and everything is fine. But when I connect to it locally, within the same network, the speed of uploading/committing files is that of my internet connection (about 1 MB/s) not like when I change the URL to something like https://MyMachine/svn/..

So it is obvious to me that it is using my internet connection while it should be rerouted to the server without leaving the network.

Is there anyway to access my server locally and remotely using the first URL?

Thanks!

Edit: I connect locally using a D7000 Router (Server is obviously wired - laptop WIFI) Remotely I connect through a 3g USB modem connected to my Laptop.

AngelicCore
  • 123
  • 1
  • 5

2 Answers2

8

Sounds like it could be a couple problems, DNS mainly

However if you want a quick solution use your local hosts file.

In you local hosts file:

192.168.10.111 MyMachine

If you are running a DNS sever in the office you should look into the setting of your NIC and make sure you are pointed to it.

Anthony Fornito
  • 9,546
  • 1
  • 34
  • 124
4

You have a few options.

  • If you have a local DNS server, create an A record for MyMachine.no-ip.com using the local ip address of your server. The benefit of this solution is that all devices in your local network will access the server locally vs going out to the internet.

  • Similar to the above solution, but instead use the local hosts file on your workstation. This option is perfectly fine, but you will have to create the hosts entry on each device you want to connect from.

  • Some firewalls, such as Sophos and Sonicwall, have the capability to create a "reflexive rule". With this method, the firewall detects devices on the local subnet and redirects them to the local IP of the server instead of sending them out to the internet and back in.

Mike M
  • 1,142
  • 5
  • 11
  • Hi Mike! Is it possible to do that using the DNS on my router somehow? I am looking for the easiest solution here. The hosts file is my current solution but as my laptop is the one having this problem I will have to manually edit it whenever I go to work or work from home. (Could possible create a script to replace the hosts file whenever it detects the home wifi but seems like too much trouble) I am using bitdefender so I am not sure if it has a similar rule – AngelicCore Apr 10 '18 at 19:03
  • It doesn't appear that your router is capable of that. Outside of one of the other solutions above, the hosts file may be your best bet. Maybe you can try one of these utilities to make managing the hosts file easier. [HostsFileEditor](https://github.com/scottlerch/HostsFileEditor) [HostsMan](http://www.abelhadigital.com/hostsman/) – Mike M Apr 10 '18 at 19:11
  • HostsFileEditor seems to be a reasonable solution if it can disable/enable hosts entries automatically – AngelicCore Apr 10 '18 at 19:28
  • I tried it - and while it seems nice it lacks auto selection based on events (i.e. at home vs on the move) – AngelicCore Apr 11 '18 at 07:14