Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

As advised in this question: Network file-sharing between Linux and Android, I have decided to use ownCloud to store files on my home cloud server.

However, my needs have changed a bit. I want to be able to access my cloud from the Internet, not just my home network.

For that, I need dynamic DNS software. I have that taken care of (domain name and everything) - I will be using DynDNS.

However, when I'm at home, is it possible to configure the server/client so that when I try to access my files it is done through my home network (192.168..) and not via Internet (querying DynDNS and what not), without having to keep the system thinking that there are two different servers?

share|improve this question
    
How you can do that depends on the DNS server your client uses. Does it get the DNS server via DHCP? –  Hauke Laging Jun 10 '13 at 18:43

1 Answer 1

up vote 1 down vote accepted

The time to resolve your request will only be incurred doing the DNS query to the dyndns DNS servers. After that when you access the IP address behind that dyndns name your packets will go to your router/NAT firewall system and get delivered directly to it, never leaving your network. So there really isn't any time savings with this approach.

If you really are concerned with the time it takes to resolve the dyndns names to IPs then you can create fake entries in one of the following places:

  1. locally on each device (entries in the /etc/hosts file)
  2. the DNS server that is built into your router/NAT device
  3. setup your own DNS server and introduce it as a server through your DHCP server's DNS server list that it's propagating

I would go with either #2 or #3, they're a little more to set up, but they're easier to maintain going forward and give you the most control. Additionally you can use the DNS server as a caching name server for your entire LAN saving the cost of doing repetitive name look ups.

share|improve this answer
    
Accepted because it's very informative. +1 because of the last sentence :) Any links that would help me understand how to do that? –  jco Jun 11 '13 at 14:08
    
DNSMasq is probably the most logical choice. If you want something more powerful there's bind. It just so happens that I wrote a tutorial for that on my blog. If you get stuck feel free to leave comments. Also it's geared to Red Hat distros but you should be able to adapt it. There are countless other tutorials if you search for dns server + distro name. –  slm Jun 11 '13 at 14:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.