Subject: BIND / DNS quick HOW-TO (was LCIII stuff)
To: Mark Benson <mdb299@soton.ac.uk>
From: John Klos <john@sixgirls.org>
List: port-mac68k
Date: 01/01/2002 14:27:50
Hi,

LCIIIs and other smaller, older machines are excellent because they are so
small, are usually stable as hell (especially since they've run for this
long), and even though they're slow, they'll get the job done eventually.

> Well yes it still only takes up to 36MB of RAM (unless your are
> crazy and feel like buying a 64MB SIMM!) but as you say it's has a
> 32-bit data path (or whatever). It's more like an LC 475 on dope
> (with a decent processor of course :) ) than an LCII on speed. It
> is slow, especially in OS 7.5.5.

It can take a 128 meg SIMM, if you're inclined to get one. I have two in
my Amiga 1200, and they do work on older m68k Macs.

I don't know if the comparison to the LC475 is fair, though; the 68040 is
generally four times faster than a 68030 when they're both running at the
same clock speed.

> It's not the quickest Unix machine I've used either (I have run
> Linux on an Athlon 1.2GHz PC though!) - SSH takes an age to log in
> from another machine and it's down for 2 minutes at the beginning
> of every hour while it regenerates the RSA keys (I could change
> that to 5 hours or whatever but I can't remember how - Newbie
> amnesia).

One thing is make sure you always use ssh1, since ssh2 is slow to start
even on a 68060.

I still have an original Amiga 3000 (25 MHz 68030, 16 megs of 32 bit
memory), and while not the quickest bitslinger in the pack, it is
acceptable with a few tweaks. If your machine is going to be set up once
for possibly years of service, it makes sense to sup the whole source tree
and rebuild it with this in /etc/mk.conf:
M68030=YES
CFLAGS+=-m68030
COPTS+=-O3

(If you want a sup-and-build mini-how-to, let me know)

Some CPU-intensive software, like parts of OpenSSH, have assembly for the
hard work; specifying your CPU on m68k does improve the speed a lot.

As far as key regeneration goes, just edit /etc/sshd.conf and change:
KeyRegenerationInterval 3600
to something more appropriate, like 21600 (6 hours).

> It'll do me. I don't really know if I can even be
> bothered to do the IMAP thing now as I realise it'd probably be a
> lot of effort to slow down my e-mail. It'll live on my desk as a
> testament to the power of 68k Macs (*choke*) and their longevity
> (it's 10 years old this year :) ) and I'm facing the hardship of
> having to sell my Blue & White G3 so I need it to stop my iBook
> getting lonely.

Perhaps I should have put in my two cents a little earlier. While DNS is
not trivial in and of itself, it can be made to appear trivial. I do
agree that there are a lot of Unix things that should already come 95%
configured with a few good examples for people to examine.

Here is a quick how-to for BIND on NetBSD:

Add this to /etc/rc.conf:
named=YES               named_flags="-b /etc/namedb/named.conf"

Edit /etc/namedb/named.conf, and add a section (or sections) like:

zone "sixgirls.org" in {
        type master;
        file "db.sixgirls.org";
};

(This, of course, would have the domain name of your domain)

Then create a file of the name listed above, like
/etc/namedb/db.sixgirls.org:

;       Sixgirls primary DNS stuff
;       11-Sept-2001 John Klos
$TTL    3600
@       IN SOA  reva.sixgirls.org.      john.sixgirls.org. (
                        20011230        ; Serial
                        10800           ; Refresh after 3 hours
                        3600            ; Retry after 1 hour
                        604800          ; Expire after 1 week
                        86400   )       ; Minimum TTL of 1 day
;
                        IN NS           reva.sixgirls.org.
;
;       This is reva, the main DNS and mail server
                        IN MX   13      reva.sixgirls.org.
;
                        IN A            216.27.131.50
                        IN AAAA         3ffe:80c0:0220:0000:0000:0000:0000:0035
                        IN HINFO        Amiga-4000/060  NetBSD
;
reva                    IN A            216.27.131.50
                        IN AAAA         3ffe:80c0:0220:0000:0000:0000:0000:0035
                        IN HINFO        Amiga-4000/060  NetBSD
;
inanna                  IN A            24.29.152.209
                        IN HINFO        MacQuadra/40    NetBSD
;
mail                    IN CNAME        reva.sixgirls.org.
ftp                     IN CNAME        reva.sixgirls.org.


A little explanation: reva.sixgirls.org is the name of the server, and
john.sixgirls.org is my email address (the @ sign won't work in the SOA
line); the serial number is an arbitrary number that should be incremented
whenever the DNS file is updated; the MX record is only needed if you want
to set up mail delivery for this domain; if you want to set up DNS for
sixgirls.org AND reva.sixgirls.org, use the blank entries first (the ones
right after the MX record); when setting up multiple records for a host
(A, AAAA, HINFO), you only need the hostname on the first line; AAAA is
for IPv6, so you probably don't need to worry about that, and HINFO is the
hardware info record, which is fluff and not necessary; each machine
should have one A record, but can have multiple CNAMEs; the "." at the end
of fully qualified names means don't auto-append the domain name...

Follow this example and you should be able to quickly set up a local
domain with your local addresses; then just add your LCIII to your DNS
list of your local machines.

When you make changes, you can reload the nameserver with:
ndc reload
then you can check that all is working properly with:
tail /var/log/messages
and see if there are any errors.

If your domain is imaginary (ie, not a real, registered domain), then make
sure your LCIII is the first DNS server listed on all of your other
machines.

If you're interested in having your LCIII receive email from the Internet
(delivered TO the LCIII as opposed to using fetchmail to get mail from
elsewhere), that would probably have to be another how-to.

Good luck, and don't be afraid to ask questions about any of the above.

John Klos
Sixgirls Computing Labs