Ciaran McCreesh wrote:
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.
Finally, something to free us from the evil (to configure) that is BIND! I'll try that. Thanks.
How can I verify this is working from the box running dnsmasq? All of the other boxes are Windows and I'm not onsite. Is there a tool that will query a DNS server directly? If I use ping or something, it consults the /etc/hosts first, which defeats the purpose.
-- Andrew Gaffney System Administrator Skyline Aeronautics, LLC. 776 North Bell Avenue Chesterfield, MO 63005 636-357-1548
-- [EMAIL PROTECTED] mailing list
