wlug
Threads by month
- ----- 2025 -----
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 1999
- 1 participants
- 1 discussions
>Yeah - I realised I hadn't mentioned that when I sent the message :)
no problem
>I've got it config'd as a dialin server and want to be able to use virtual
>hosts etc for remote callers. I've already got them to put entries in their
>c:\windows\hosts files but it's messy.
Hmm, okay.
>Okay - so how do I find out what IHUG's are? I can look it up on their web
>site but there must be an easier way - either using W95/98 or RH6.0.
Oh, i assumed your isp was clear because of your email address :)
203.29.160.4
203.29.160.2
:)
>Yeah, I'd appreciate that - please do. Start with "You add entries to your
>DNS by ...."
<sigh>. :)
this will be a LONG post i feel...
Its probably worth sending to the mailing list however, so that anyone else
who is curious about setting up DNS can have a look...
First of all, redhat 6.0 ships with bind-8.2-6
do 'rpm -qa | grep bind' as root to see what bind rpms you have installed,
if any
you should have
bind-8.2-6
bind-devel-8.2-6
bind-utils-8.2-6
or something very similar (ie, the revision number might have changed for
your release of rh6.0)
if you dont have these then install them.. (either use an X-based package
management tool like gnorpm, or use rpm from the command line..)
put your rh6.0 cd in the cdrom drive
mount /mnt/cdrom
rpm -Uvh /mnt/cdrom/Redhat/RPMS/bind*
and you should be away :)
right...
now for the config files
at this point i VERY strongly recommend you go away and read the docs for
bind at www.isc.org
here's some pointers
Some config hints for bind 8.2.1 (slightly newwer version that the rh6.0
one, but still applies)
http://www.isc.org/view.cgi?/products/BIND/misc/config_hints.phtml
Bind 8.2 configuration guide
http://www.isc.org/view.cgi?/products/BIND/docs/config/index.phtml
bind 8.2 master file format
http://www.isc.org/view.cgi?/products/BIND/docs/bind8.2_master-file.phtml
The BOG (BIND Operations Guide) was a very useful resource for bind-4.9.7,
but this version of bind is oldish and you should probably use 8.2 series.
the configuration guide tells you what to do, more or less, but we can have
a look at them here too...
i'll add comments, these are indicated by // preceeding
------ /etc/named.conf ------
// make sure you get all the {'s and ;'s in the right place here
options {
directory "/var/named"; // this tells named where to set its base dir to.
};
logging {
category lame-servers { null; }; / these send all the boring errors
that you dont
category cname { null; }; // care about to null, rather than actually
logging them
};
zone "." in {
type hint; // the 'hint' file is a set of root servers. these are
important if you
file "named.cache"; // want your dns server to work on address outside
your zones
}; // i'll show how to get a named.cache file later
zone "0.0.127.in-addr.arpa" in { // the 0.0.127 zone is the reverse zone
for your localhost
type master; // its a master file
notify no; // dont notify
file "slave/127.0.0.in-addr.arpa"; // the file name
};
zone "foo.org" in { // forward lookup for your 'domain' on your local network
type master; //master file
file "slave/foo.org"; //filename
};
zone "0.168.192.in-addr.arpa" in { //reverse lookup for your domain, on
192.168.0.xxx
type master; // note the reverse order of ip addresses
file "slave/0.168.192.in-addr.arpa";
};
---- eof-----
right, now in /var/named you should have some files...
/var/named/named.cache
there is possibly already a named.cache file, but we should update it anyway..
anonymous ftp to ftp.internic.net
cd domain
get named.cache
cp named.cache /var/named/named.cache -f
okay, thats your cache file set up. now to set up some zone files
first of all, make a directory in /var/named to hold the zone files..
mkdir /var/named/zone
cd /var/named/zone
now..
there are two types of zone files.. forward lookup (which contain mappings
from hostnames to ip addresses) and reverse lookup (which contain mappings
from ip addresses to hostnames)
first we'll look at the forward zone files.
/var/named/zone/foo.org (or whatever you call it, make sure the entry in
the named.conf file points to the right place tho)
; denotes a comment in these files
-------------------
;
; /var/named/zone/foo.org
; zone file for foo.org
; 27/7/1999
@ IN SOA server. root.server. (
1999072701 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
1D) ; minimum
; first of all, lets look at these.
; the @ inserts the domain information by default. so, it expands out to
foo.org
; the rest of that line says that the Start Of Authority (SOA) for the
domain is server
; and the admin email is root(a)server
; the serial number is important. when you change a zone file, change its
serial number,
; otherwise bind will not reload it.
; also, bind will only load /higher/ serial numbers. you can number any
way you like, for
; example starting at 1, but it is sometimes handy to put them in the
format yyyymmdd
; where yyyy == year, dd = day of month, mm = month, rr = revision number.
; the refresh, retry, expire and minimum values are all required by named,
it tells it how
; often to do the related action.
; ie, Refresh this zone every 8 hours. rertry an ip on this zone every 2
;
NS server.foo.org.
;specifies that the NameServer for the domain is server.foo.org.
MX 10 server.foo.org.
; Mail eXchange for the domain is server.foo.org. the number is the
priority, 10 is a good
; number to leave there. NOTE both of these have a trailing '.' - if you
DONT include this it
; will expand out with your domain name after it (ie, to
server.foo.org.foo.org ) !!!
localhost A 127.0.0.1
; A records point from the hostname to its ip. this is the ip of the
localhost (the server)
server A 192.168.0.2
; this is the A record for the server, assuming its ip addresss is 192.168.0.2
HINFO "Pentium" "Linux 2.2"
TXT "Gateway / Server"
; these lines aren't needed, but add extra information. There are a lot of
extra lines like this
; dont worry about them if you like - not including them is perhaps a
/good/ thing.
mail CNAME server
www CNAME server
ftp CNAME server
proxy CNAME server
dns CNAME server
; CNAMES are records that point to an A record. Not needed really, but
sometimes is nicer
; (and more obvious) to use 'proxy' for your proxy settings, and 'mail' in
your mailclient setup.
; Various DNS experts discourage the usage of CNAME, because it can lead to
trouble if
; you do things like point your MX record to a CNAME.
; You could use multiple A records (eg, 'ftp A 192.168.0.2' but that gets
messy,
; and you only have one reverse lookup anyway
windows A 192.168.0.1
; A record for your windows computer
dialin1 A 192.168.0.10
dialin2 A 192.168.0.11
; A records for your dialin ip addresses.
; I forget how dialing into a linux server works, particularly with regards
to ip allocation,
; you may only be able to specify 1 ip address for each dialin device.
------ EOF -----
thats the end of it! there are a lot of things you COULD include in there,
but thats all you need.
now, onto the reverse lookup zone files
/var/named/zone/0.0.127.in-addr.arpa
---------------
;
; /var/named/zone/0.0.127.in-addr.arpa
; zone file for 0.0.127.in-addr.arpa
; 27/7/1999
@ IN SOA localhost. root.localhost (
1999072701 8H 2H 1W 1S )
; note, we condensed everything down here. the whitespace in the previous
example
; is for clarity, you dont need it or the comments at all.
NS server.foo.org.
; nameserver entry. note the trailing '.'
1 PTR localhost.
; PTR record. this is a reverse lookup for 1.0.0.127.in-addr.arpa (ie, if
you do 'nslookup
; 127.0.0.1' - it'll look in this file, find the PTR entry for '1', and
reply with the given value.
; again note the trailing '.' - if you forgot that it would expand to
localhost.0.0.127.in-addr.arpa
------ EOF ----
/var/named/zone/0.168.192.in-addr.arpa
----------------
;
; /var/named/zone/0.168.192.in-addr.arpa
; zone file for 0.168.192.in-addr.arpa
; 27/7/1999
@ IN SOA server. root.server. (
1999072701 8H 2H 1W 1D)
IN NS server.foo.org.
; NS for zone is server.foo.org - again, note the trailing '.'
1 IN PTR windows.foo.org.
2 IN PTR server.foo.org.
10 IN PTR dialin1.foo.org.
11 IN PTR dialin2.foo.org.
-------- EOF -----------
once you have created all these files, try starting named by going
/etc/rc.d/init.d/named start
if you check the output of /var/log/messages , it should display some
information about whats happening (tail -f /var/log/messages on another
console to look at it, ctrl-c to break out of 'tail' )
it should give you some output along the lines of...
Jul 27 02:22:40 server named[12344]: starting. named 8.1.2 Thu Sep 24
02:47:08 EDT 1998 ^Iroot(a)porky.redhat.com:/usr/src/bs/BUILD/src/bin/named
Jul 27 02:22:40 server named[12344]: cache zone "" (IN) loaded (serial 0)
Jul 27 02:22:40 server named[12344]: master zone "0.0.127.in-addr.arpa"
(IN) loaded (serial 1997072701)
Jul 27 02:22:40 server named[12344]: master zone "0.168.192.in-addr.arpa"
(IN) loaded (serial 1997072701)
Jul 27 02:22:41 server named[12344]: master zone "foo.org" (IN) loaded
(serial 1997072701)
Jul 27 02:22:41 server named[12344]: listening on [127.0.0.1].53 (lo)
Jul 27 02:22:41 server named[12344]: listening on [192.168.0.2].53 (eth0)
Jul 27 02:22:41 server named[12344]: listening on [203.109.198.21].53 (ppp0)
Jul 27 02:22:41 server named[12344]: Ready to answer queries.
okay..
now, make sure your /etc/resolv.conf has the line 'nameserver 192.168.0.2'
at the TOP of the nameserver lists.
then do..
nslookup server.foo.org
you should get the response
--
Server: server.foo.org
Address: 192.168.0.2
Name: server.foo.org
Address: 192.168.0.2
--
now do
nslookup localhost
--
Server: server.foo.org
Address: 192.168.0.2
Name: localhost
Address: 127.0.0.1
---
(or something similar)
nslookup 192.168.0.1
you should get
--
Server: server.foo.org
Address: 192.168.0.2
Name windows.foo.org
Address: 192.168.0.1
--
if thats all go, then forward DNS works.
now try reverse..
nslookup 192.168.0.1
--
Server: server.foo.org
Address: 192.168.0.2
Name windows.foo.org
Address: 192.168.0.1
--
as you can see, it looks the same :)
So, all you have to do now is set up your dialin clients to use your dns
server - i'm not sure if this can be forced upon them when they dial in, or
if they should set it manually, but that's for you to work out :)
I've led you through this entirely - thats because I was very bored
tonight, and had nothing else to do :). I do urge you to go and read the
documentation on www.isc.org, and the docs that come with the bind rpms.
UNDERSTAND them... no point in doing things like this if you dont
understand them..
Good luck. you shouldn't have many problems (unless i included some typos
there), but if you do, read the docs, work it out, and then report back to
the list telling us what went wrong and how you fixed it :)
Daniel Lawson
1
0