I had an idea over christmas how to fix my rather dull and meaningless network setup at home. However, as I am no expert on this topic, I thought I'd share it here, hoping someone could share some thoughts on this.
So, here's the general idea:
- I own a domain which is hosted somewhere for www / internet e-mail (shared host, managed).
- At home, I have a gentoo box used as a "server" - mainly for data storage (but see below...)
- At home, I am behind a router doing NAT (1 public IP)
Therefore, there shall be a postfix running on the server, which is responsible for delivering mails of the form user@subdomain.mydomain.com (while mail of the form user@domain.com is still handled by my ISP).
I am not so sure about the DNS stuff; what I DON'T want is that the server has to be up and running all the time; that is, if my girl-friend turns on her laptop, the router shall give her an IP (via DHCP) and she shall be able to use the Internet (of course, if she wants to use the Intranet, she'd have to turn on the server); therefore, DHCP shall still be handled by the router for the whole home-network.
However, I want the allocation of hostname to IP-address (and / or vice-versa) to be known all over my internal network - that is, the server somehow should match IP's to hostnames in a central way (as my hosts always have the same name - maybe it could somehow look for hosts on the network, get their IPs and record them somewhere?) --> this is the part I really have absolutely no idea about - I even have difficulties in expressing myself, as I just realize...
So, in summary:
- How do I set up the DNS stuff? The absolute minimum is that all the hosts know that server.subdomain.mydomain.com is the box on (local) IP 1.1.1.1 - and also, that it is responsible for e-mail delivery in this local subdomain
- What exactly has to be done "externally" (on some DNS records that are managed by my ISP)?
- Is this at all possible / even a good idea? Maybe there are better ideas around?


