I'm running Scientific Linux SL release 5.5 (Boron) and I'm trying to setup bind to run local domains for web development testing like mydomain.local.
I'm under the impression that I can do this with caching-nameserver but I'm a noob when it comes to this.
here is my /var/named/chroot/etc/named.caching-nameserver.conf
Code:
#
# Example config created by SilentRage @ www.dollardns.net
#
# Requires:
# http://www.dollardns.net/bind/named.ca
# http://www.dollardns.net/bind/basiczone.com.zone
# http://www.dollardns.net/bind/127.0.0.rev
#
################################################################################
# Server Configuration
#
options {
# Set the working directory from which all relative paths are based
# For the win2k default install "C:\WINNT\system32\dns\etc"
#
directory "/var/named";
# RECURSION - Required for caching servers
# Default: yes
# Values : yes, no
#
# yes: Attempt to resolve requests we are not authoritative for
# no : Do not resolve requests we are not authoritative for
#
recursion yes;
# ALLOW-RECURSION - Who may use our caching server?
# Default: any;
# Values : any, none, (addresslist)
#
# any : anybody may use the caching server
# none : noone may use the caching server
# address: List of IP addresses that may use the caching server.
#
allow-recursion { localhost; localnets; };
# FORWARD - Recommended for caching servers
# Default: first
# Values : first, only
#
# first: Query "forwarders" first, then resolve request ourself
# only : Only query the "forwarders" to resolve requests
#
forward first;
# FORWARDERS - Required if "forward" is used
# Default: (no forwarding)
# Values : (addresslist)
#
# It is recommended that you use your ISP's caching server addresses
# Example: forwarders { 127.0.0.1; 127.0.0.2; }
#
forwarders {68.87.76.182; 68.87.76.134;};
# QUERY SOURCE - Useful for caching servers behind a firewall
# Default: address * port *
# Values : The IP address and port to use as the source of queries to other servers
#
#query-source address * port 53;
# NOTIFY - Relevant to authoritative servers
# Default: yes
# Values : yes, explicit, no
#
# yes : Send DNS NOTIFY messages to slave servers in zone NS records when zone changes
# explicit: Only send DNS NOTIFY messages to "also-notify" hosts
# no : Never automatically send DNS NOTIFY messages
#
notify no;
};
################################################################################
# Logging Configuration
#
logging {
#
# Define channels for the two log files
#
channel query_log {
severity info;
print-time yes;
file "query.log" versions 3 size 100M;
};
channel activity_log {
severity info;
print-time yes;
print-category yes;
print-severity yes;
file "activity.log" versions 3 size 100M;
};
#
# Send the interesting messages to the appropriate channels
#
category queries { query_log; };
category default { activity_log; };
category xfer-in { activity_log; };
category xfer-out { activity_log; };
category notify { activity_log; };
category security { activity_log; };
category update { activity_log; };
#category update-security { activity_log; }; # BIND 9.3 only
#
# Dump all uninteresting messages
#
category network { null; };
category lame-servers { null; };
};
################################################################################
# Zone Configuration
#
#
# Specify the root name servers
#
zone "." IN {
type hint;
file "named.ca";
};
#
# Configure ourself as the host for basiczone.com
#
#zone "basiczone.com" IN {
# type master;
# file "basiczone.com.zone";
#};
#
# Configure ourself as the host for mydomain.local
#
zone "mydomain.local" IN {
type master;
file "mydomain.local.zone";
};
#
# Reverse IP mapping for 127.0.0.x
#
zone "0.0.127.in-addr.arpa" {
type master;
file "127.0.0.rev";
};
my mydomain.local.zone file is:
Code:
$TTL 900 ; 900 seconds default record (T)ime (T)o (L)ive in cache
@ SOA ns1 ( ; ns1.mydomain.local is the primary server for mydomain.local
postmaster ; contact email for mydomain.local is postmaster@mydomain.local
2004041700 ; Serial ID in reverse date format
21600 ; Refresh interval for slave servers
1800 ; Retry interval for slave servers
604800 ; Expire limit for cached info on slave servers
900 ) ; Minimum Cache TTL in zone records
@ NS ns1 ; ns1.mydomain.local is a host for mydomain.local
@ NS ns2 ; ns2.mydomain.local is a host for mydomain.local
@ A 127.0.0.4 ; mydomain.local's IP address is 127.0.0.4
@ MX 10 mail ; Mail for *@mydomain.local is sent to mail.mydomain.local
ns1 A 127.0.0.1 ; ns1.mydomain.local's IP address is 127.0.0.1
ns2 A 127.0.0.2 ; ns2.mydomain.local's IP address is 127.0.0.2
mail A 127.0.0.3 ; mail.mydomain.local's IP address is 127.0.0.3
www A 127.0.0.4 ; www.mydomain.local's IP address is 127.0.0.4
I don't even know where to begin for the 127.0.0.rev file, and I'm pretty sure my mydomain.local.zone file is pretty much wrong. All that I can find online are tutorials for DNS on the Internet, I've read through the DNS and Bind O'Reilly book, and I'm now more confused than when I began...
I don't need mail service on this domain, but I'm not sure which part of the records I can just remove without adversely affecting the setup.
named-checkconf named.caching-nameserver.conf Doesn't return any errors.
I could use some help if anyone has the time, thanks.