Addressing a host from both internal and external networks

0

I have a fairly standard home network set-up with a router and a couple machines on the internal network (with private IP addresses 10.0.0.x). One of these machines is running my subversion server, which is in turn used by my laptop. I am now trying to configure my laptop in a way that I can have one working subversion copy connected to the repository which works both when the laptop is connected to my home network as well as if its connecting from internet. I configured a "virtual server" on the router, so that port 443 goes to the machine with subversion, and this works fine. Now I don't know how to configure the laptop to go to the same machine - because the IP is different if I want to access it from outside and from inside. I tried to connect to the external IP of my network, but the router refuses to let the connection go "out and in again". Any ideas how to get it configured?

I am using Debian linux with wpa_supplicant on the laptop.

Grzenio

Posted 2010-08-17T07:54:29.363

Reputation: 2 599

Answers

2

I suppose that you have SOHO hardware router and cannot, for example, tweak iptables setup on it. In that case, I think the easiest way is to set up a simple proxying DNS server on SVN machine (like pdnsd, set it as a DNS server in router config, then get a dynamic DNS (probably you are already using one) and map that domain to your local IP address in your local DNS.

So when SVN is accessed from outside, your laptop resolves the domain to external address and your router forwards the connection; when from inside, the same domain resolves to local IP and direct connection is estabilished. Moreover, that allows you to use single SSL certificate valid for that domain if you want.

whitequark

Posted 2010-08-17T07:54:29.363

Reputation: 14 146