Why do you want to alias all external names to a .fake domain? I don't see what advantage that brings. If you aren't connected, then you can't reach them. If you are connected, then the FQDN work fine. Of course you can't use domain names for forwarding; the DNS server can't resolve the name without knowing the IP address.
The standard way to do intermittent connections is to rewrite the /etc/resolv.conf file to use the local DNS servers. If you want to use a local caching nameserver, then the connection scripts rewrite the forward section of /etc/named.conf.
| [reply] |
I don't want to rewrite /etc/resolv.conf,/etc/printcap,/etc... every time I connect. And I don't want to write a conf-rewriting program every time I install a program. The Nameserver could resolve the fake-names because it would be master for this domain.
| [reply] |
What are you trying to accomplish? Do you want name resolution to work regardless of provider? There are three standard solutions to this problem:
- Use provider nameservers. Change /etc/resolv.conf on connections.
- Use local nameserver with forwarding. Change /etc/named.conf.
- Use local caching nameserver. Change named.ca containing root name servers to use fake roots when disconnected. This makes lookup failures when disconnected fast.
Are you trying to solve the problem of stable names for other services? You want to use the same name (smtp.fake) in sendmail config regardless of providers. Running a local nameserver for the .fake zone will do this. But then you need to change the .fake zone file on each connection. And change the forwarding line (or root zone file) as above to make the resolution of other names work. This is doable with BIND.
| [reply] |