# transparently switching networks, but keeping data

## avx

// couldn't find a better title, sry

So I've got all my important data stored on my NAS at home and can remotely mount it -for that, I'm mostly using SSHFS.

Now, I'd like to find a way, to make this mounting and accessing as transparent/non-interactive as possible. At home, the NAS is 10.0.0.XYZ, so I use this, but roaming the world, I off course need to rely on mynas.dyndnsprovider.tld.

Using the private IP works at home, but not on the run, using the dynamic DNS at home, routes over the internet and is thus slower then the local connection.

So the question is, how to do it nice and simple? Thanks.

----------

## javeree

I'd suggest intercepting dns queries to mynas.dyndnsprovider.tld within your network and returning the private network address there. 

if you have a gentoo machine running as router some options could be define the nas in /etc/hosts

192.168.0.xyz     mynas    mynas.dyndnsprovider.tld

or you could run dnsmasq on your router. dnsmask would assign your nas router a dynamic address, and queries to mynas.dyndnsprovider.tld would then be answered by dnsmasq.

----------

