ianw1974 Posted July 31, 2006 Report Share Posted July 31, 2006 OK, just as I said I would post, here's mine. These are from Red Hat, but you can more or less adopt them for any distro you like changing the pathnames to wherever the files exists. named.conf: options { directory "/var/bind"; forwarders { 194.204.159.1; #external dns server 1 194.72.9.39; # external dns server 2 }; listen-on-v6 { none; }; listen-on { 10.100.100.30; }; # your ip address of your dns server pid-file "/var/run/named/named.pid"; }; include "/etc/bind/acl.conf"; zone "." IN { type hint; file "named.ca"; }; zone "localhost" IN { type master; file "pri/localhost.zone"; allow-update { none; }; notify no; }; zone "127.in-addr.arpa" IN { type master; file "pri/127.zone"; allow-update { none; }; notify no; }; zone "buziaks.com" IN { type master; file "pri/buziaks.com.zone"; allow-query {our-networks;}; # using my acl here for only my networks allow-update {none;}; }; acl.conf (for allowing interrogation by only your own IP ranges): acl "our-networks" { 10.100.100.0/24; 192.168.1.0/24; 192.168.10.0/24; 127.0.0.1; }; now the zone files that are earmarked in named.conf: 127.zone: $ORIGIN 127.in-addr.arpa. $TTL 1W @ 1D IN SOA localhost. root.localhost. ( 2002081601 ; serial 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum 1D IN NS localhost. * 1D IN PTR localhost. localhost.zone: $TTL 1W @ IN SOA ns.localhost. root.localhost. ( 2002081601; Serial 28800 ; Refresh 14400 ; Retry 604800; Expire - 1 week 86400 ) ; Minimum IN NS 127.0.0.1 localhost. IN A 127.0.0.1 buziaks.com.zone: $TTL 14400 @ IN SOA ns1.buziaks.com. admin.buziaks.com. ( 2006032401 ; serial 7200 ; refresh 7200 ; retry 604800 ; expire 86400 ) ; minimum buziaks.com. IN NS ns1.buziaks.com buziaks.com. IN A xxx.xxx.xxx.xxx (external ip here to your website so that internal resources go here) mail.buziaks.com. IN A 10.100.100.30 www.buziaks.com. IN A xxx.xxx.xxx.xxx (same as above, so external ip here - in case users type www.yourdomain and not just yourdomain) buziaks.com. IN MX 5 mail.buziaks.com webmail.buziaks.com. IN A 10.100.100.30 proxy.buziaks.com. IN A 10.100.100.20 note the comments in brackets don't exist in the file, I've put these so you know what to put here, so make sure your file doesn't have these. Please note that this file mostly has all internal references to your machines, apart from if you have your website hosted externally, like I do, so you have your external pointers - unless you host it yourself, then put your internal ip of your web server. Also note, that when you make changes to the file, to update the serial. At the end is the 01 digit, change this to 02, 03, 04, etc each time you make a change. If you only have one DNS server, then this doesn't matter too much, it's just to keep them in sync. Otherwise, if only one, just leave it, since it won't be replicating with the internet DNS servers anyhow. The format of the serial is usually yyyymmddxx where xx is version info. This file is correct, however, I'm not using this one myself. I've replaced my clients values, with my values, but the workings are the same, and will provide you with a working DNS server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.