On Wed, 28 Jan 2004 22:11:06 -0600 Andrew Gaffney <[EMAIL PROTECTED]> wrote: | I run a Gentoo server at skylineaero.com. I have someone else running | my DNS for me. Inside the LAN, I want to run a full DNS server for | boxes inside the LAN. That part is easy. Here's the hard part. When | any computer inside the LAN tries to resolve skylineaero.com, | www.skylineaero.com, etc., I want it to get the LAN IP instead of the | external internet IP. How can I do this?
Dead easy... On your local DNS server: * emerge dnsmasq * mv /etc/resolv.conf /etc/resolv.dnsmasq * echo "nameserver 127.0.0.1" > /etc/resolv.conf * echo 'DNSMASQ_OPTS="-r /etc/resolv.dnsmasq"' > /etc/conf.d/dnsmasq * add in /etc/hosts entries for skylineaero.com with the *local IP* to /etc/hosts. also add in entries for all the boxes on your LAN. * rc-update add dnsmasq default * /etc/init.d/dnsmasq start On every other box: * echo "nameserver IP_OF_YOUR_LOCAL_DNS_SERVER" > /etc/resolv.conf dnsmasq is just a little server (suitable for < 100 clients) that tries to resolve from /etc/hosts, and forwards on to another nameserver (your ISP, presumably) if it can't find a match. -- Ciaran McCreesh Mail: ciaranm at gentoo.org Web: http://dev.gentoo.org/~ciaranm
pgp00000.pgp
Description: PGP signature
