dns-more than I ever wanted to know...
Steve Bertrand
iaccounts at ibctech.ca
Fri Sep 24 06:55:30 PDT 2004
> I've come across a ton of DNS tutorials on the web. Everything I've
> found so far is very lengthy. I need to setup a simple small
> office/home office network with DNS so that it resolves my inside
> network among the machines and hides it from the greater internet.
>
> I'm open to suggestions of a quick fix that won't take me a day and
> half reading full time.
# cd /etc/namedb
# chmod 744 make-localhost
# ./make-localhost
# ee named.conf
Change or add the following:
forwarders {
142.77.2.36;
142.77.1.1;
142.77.1.5;
};
... and then add a record for a domain.
zone "domain.com" {
type master;
file "domain.com.zone";
allow-transfer { 192.168.0.3; }; // This is your secondary DNS
allow-update { none; };
};
...Now you have to create a zone file:
# ee domain.com.zone
--- start zone file ---
$TTL 360
domain.com. IN SOA ns1.domain.com.
admin.domain.com. (
2004090801 ; Serial
7200 ; Refresh
3600 ; Retry every hour
1728000 ; Expire every 20 days
172800 ); Minimum 2 days
;
; Set the name servers to whatever was used when registered
IN NS ns1.domain.com.
IN NS ns2.domain.com.
@ IN A x.x.x.x
; Set the Mail Exchange record
@ IN MX 10 mail.domain.com.
@ IN MX 20 mail2.domain.com.
; Host records
; Core
ns1 IN A x.x.x.x
ns2 IN A x.x.x.x
www IN A x.x.x.x
--- end zone file ---
... now:
# chown bind:bind *
# /usr/sbin/named -u bind -g bind
....should get you resolving for your domain, as well as for external
domains. To start up the daemon at startup, add the following to
/etc/rc.conf:
# ee /etc/rc.conf
named_enable="YES"
named_program="/usr/sbin/named"
named_flags="-u bind -g bind"
...all off the top of my head, so forgive me if I left something out.
If you don't have a domain internally and you want to resolve only
external names, skip adding the domain entry and the zone file pieces
of this email.
Let me know if I missed something or it doesn't work as expected.
HTH,
Steve
>
> Thanks,
>
> Alex
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Alexander Sendzimir (owner) 802 863 5502
> MacTutor: Apple Mac OS X Consulting info at mactutor.biz
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list