PDA

View Full Version : DNS config! I've made it this far! HELP!!!


tom7711
05-24-2002, 06:55 AM
I have been trying to resolve this issue for some months and would really appreciate help with this as I am at my wits end! Could someone please tell me where I am going wrong.

ALL I want to do is run DNS INTERNALLY without using 3rd party apps. I want to be able to develop web sites across my network at my home by name.

I have a G4 running OS X Server 10.1.4 connected to 2 Macs and 1 PC connected to ISDN via a router which is NAT enabled and my network settings are static.

I understand, from sources and TILs, that 3 files need to be configured to allow me to run DNS.

Issues.
1. Do I need to turn on IP aliasing, or is it on by default
2. Do Ineed to insert my servers IP address in the DNS network panel
3. Are their any other files I need to configure
4. How do I know when DNS is running
5. What other issues should I be looking at?

Below are the 3 configured files showing my server IP as 10.0.1.2 router 10.0.1.1 and my registered domain, lets call it "www.domainname.co.uk" and my server host name "serverhostname"

1. Named.conf
-----------------------------------------
zone "." in {
type hint;
file "db.cache";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};

//
// The following entries are where your zone information is entered
//


// This file contains the host names and their correlating IP addresses.

zone "domainname.co.uk" in {
type master;
file "db.domainname.co.uk";
};

// This file contains the IP addresses and their correlating reverse lookup.

zone "1.0.10.in-addr.arpa" in {
type master;
file "db.10.0.1";
};

END-----------------------------------------

2. db.10.0.1
;
; Default db.192.249.249 file installed by Apple server admin
;


1.0.10.in-addr.arpa. IN SOA macsolutions.macsolutions.co.uk. administrator.macsolutions.co.uk. (
1 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day

;
; Name servers
;
1.0.10.in-addr.arpa. IN NS serverhostname.domainname.co.uk.

;
; Addresses point to canonical name
;
2.1.0.10.in-addr.arpa. IN PTR serverhostname.domainname.co.uk.
1.1.0.10.in-addr.arpa. IN PTR router.domainname.co.uk.
3.1.0.10.in-addr.arpa. IN PTR powerbook.domainname.co.uk.
4.1.0.10.in-addr.arpa. IN PTR pcbase.domainname.co.uk.

END-----------------------------------------

3. db.computerhostname

domainname.co.uk.. IN SOA serverhostname.domainname.co.uk.
administrator.macsolutions.co.uk. (
10 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day

;
; Name servers
;
domainname.co.uk. IN NS serverhostname.domainname.co.uk.

;
; Addresses for the canonical names
;
localhost.macsolutions.co.uk. IN A 127.0.0.1

serverhostname.domainname.co.uk. IN A 10.0.1.2
router.domainname.co.uk. IN A 10.0.1.1
powerbook.domainname.co.uk. IN A 10.0.1.3
pcbase.domainname.co.uk. IN A 10.0.1.4

;
; Aliases
;
www.domainname.co.uk. IN CNAME serverhostname.domainname.co.uk.
ftp.domainname.co.uk. IN CNAME serverhostname.domainname.co.uk.
mail.domainname.co.uk. IN CNAME serverhostname.domainname.co.uk.

; Here we shorten user mail addresses by adding an MX Record.
; An MX Record prevents someone from having to type user@mail.domainname.co.uk.
; Instead, user@domainname.co.uk. may be used.

domainname.co.uk. INMX 10 serverhostname.domainname.co.uk.
domainname.co.uk. INMX 20 relay.myisp.net.

END-----------------------------------------

ashevin
05-24-2002, 08:23 AM
I'm a bit confused on what exactly you want to accomplish.

Let me layout what I think your setup is, and then perhaps you can fill in the gaps...

You have 4 machines: 3 Macs and 1 PC. They are all connected to an ISDN router that does NAT. One of the Macs is a server (OS X Server), which you want to use as a DNS and web server for the other 3 machines.

Questions:
Do all the machines have internal (10.0.1.x) addresses, or does one also have a routable IP (via the ISDN connection)?
If one has a routable IP, is it the server?
Will DNS lookups for *any* of the machines be done from outside your network?

Answer all that, and I think we can get you up and running.

- Avi

mervTormel
05-24-2002, 12:16 PM
TITLE

Mac OS X Server 10.1: How to Set Up DNS in a NAT Environment

Article ID: 106853
Created: 4/15/02
Modified: 4/30/02
------------------------------------------------------------------------
TOPIC

Using BIND, you can create a basic Domain Name System (DNS) configuration while using network address translation (NAT).


http://kbase.info.apple.com/cgi-bin/WebObjects/kbase.woa/130/wa/query?type=id&val=KC.106853&searchMode=Expert

tom7711
05-24-2002, 01:54 PM
Ashevin
You are correct in what I want to accomplish.

I first need to setup DNS, and later, when DNS is up and running I will need to setup Apache and WebDav to develop websites internally.
1. All machines have internal IP addresses via DHCP from the router (Draytek Vigor2000)
2. Do not know what a routable IP is?
3. My network will only run locally and will not be made accessable outside.(for now)

ashevin
05-24-2002, 03:21 PM
In that case, what you've done so far is overkill. The first thing I would consider is not using DNS at all. For 4 machines, it's much easier to use hosts entries.

But... Here's what you need to do to make it work for you...

I will explain by way of example with my own domainname.

zone entry from named.conf:

zone "ashevin.com" {
type master;
masters { <ip of server>; };
file "/etc/bind/named.ashevin.com";
};


contents of /etc/bind/named.ashevin.com:

$ORIGIN .
$TTL 86400 ; 1 day
ashevin.com IN SOA ashevin.com. avi.bad.htt-consult.com. (
3599073793 ; serial
3600 ; refresh (1 hour)
600 ; retry (10 minutes)
1735200 ; expire (2 weeks 6 days 2 hours)
0 ; minimum (0 seconds)
)
NS avi.ashevin.com.
NS bad.htt-consult.com.
NS ns1.granitecanyon.com.
NS ns2.granitecanyon.com.
A 65.84.78.231
MX 10 avi.ashevin.com.
MX 20 ashevin.com.
$ORIGIN ashevin.com.
avi A 68.41.237.82
MX 10 avi
MX 20 ashevin.com.
desktop A 10.0.0.7
laptop A 10.0.0.2
www CNAME avi


You don't need any of the reverse-lookup zones for this. My domain is available via the internet, but as you can see, I also have some local IPs (10.0.0.7 and 10.0.0.2) in there. This setup works just fine for me. I hope this is a good starting point.

- Avi

tom7711
05-25-2002, 04:20 AM
I configured the file you sent with my info, these files are now "named.conf" and "named.macsolutions.co.uk"

Is this correct?
Is their any unwanted copy within the files?

My servers host name is "macsolutions" and my domain is "www.macsolutions.co.uk"

1. Named.Conf

controls {
// unix "/var/run/ndc" perm 0600 owner 0 group 0;
inet 127.0.0.1 port 54 allow {any; };
};

options {
directory "/var/named";
notify yes;
statistics-interval 1;
//stats-file "named-stats";
};

zone "macsolutions.co.uk" in {
type master;
masters { <10.0.1.2>; };
file "named.macsolutions.co.uk";
};

zone "249.249.192.in-addr.arpa" in {
type master;
file "db.192.249.249";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};

zone "." in {
type hint;
file "db.cache";
};

END--------------------------------------------

2.named.macsolutions.co.uk


macsolutions.co.uk. IN SOA macsolutions.macsolutions.co.uk. administrator.macsolutions.co.uk. (
1 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day



NS macsolutions.macsolutions.co.uk.
NS macsolutions.macsolutions.dev.

localhost.macsolutions.co.uk. A 127.0.0.1
macsolutions.macsolutions.co.uk. A 10.0.1.2
router.macsolutions.co.uk. A 10.0.1.1
powerbook.macsolutions.co.uk. A 10.0.1.3
pcbase.macsolutions.co.uk. A 10.0.1.4
desktop.macsolutions.co.uk A 10.0.1.5

macsolutions.co.uk. MX 10 macsolutions.macsolutions.co.uk.
macsolutions.co.uk. MX 20 relay.myisp.net.

www.macsolutions.co.uk. CNAME macsolutions.macsolutions.co.uk.

END--------------------------------------------

ashevin
05-26-2002, 06:44 AM
Just a couple comments...

(excerpt from your named.conf)
---
zone "249.249.192.in-addr.arpa" in {
type master;
file "db.192.249.249";
};
---

Why is that there?

---
macsolutions.co.uk. IN SOA macsolutions.macsolutions.co.uk.
---

That should read:
macsolutions.co.uk. IN SOA macsolutions.co.uk.
(Get rid of the first macsolutions after SOA)

---
NS macsolutions.macsolutions.co.uk.
NS macsolutions.macsolutions.dev.
---

What is that second entry? There is no .dev domain.

---
localhost.macsolutions.co.uk. A 127.0.0.1
macsolutions.macsolutions.co.uk. A 10.0.1.2
router.macsolutions.co.uk. A 10.0.1.1
powerbook.macsolutions.co.uk. A 10.0.1.3
pcbase.macsolutions.co.uk. A 10.0.1.4
desktop.macsolutions.co.uk A 10.0.1.5
---

Get rid of the first line. It makes no sense as a DNS entry because that's always local to the machine. On OS X you'll see that 127.0.0.1 is not assigned to the ethernet interface anyway.

The last line is missing the dot at the end of the host name.

Other than that, it looks good to me. The first thing to do after fixing it up is to restart bind and check syslog for any messages. After bind is happy, set the DNS server on one of the clients to point to macsolutions.macsolutions.co.uk, and check that you can ping by hostname one of the other machines.

You should be all set.

- Avi

tom7711
05-26-2002, 07:30 AM
I have deleted the zone and made the adjustments but I cant see your amendment refering to the missing dot at the end of the host name.

I inserted "NS macsolutions.macsolutions.dev. " because it was a site I was developing.

Do I need to configure the file "db.127.0.0"

Sorry if I am a bit slow on this , but how do I restart bind and where do I check syslog

When I have DNS running could you show me how to setup Apache so that I can access my web sites in development by name.

When using DNS with Apache for developing web sites, do I need to configure NetInfo in anyway or is this another direction to go instaed of Apache.


1. Named.Conf

controls {
// unix "/var/run/ndc" perm 0600 owner 0 group 0;
inet 127.0.0.1 port 54 allow {any; };
};

options {
directory "/var/named";
notify yes;
statistics-interval 1;
//stats-file "named-stats";
};

zone "macsolutions.co.uk" in {
type master;
masters { <10.0.1.2>; };
file "named.macsolutions.co.uk";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};

zone "." in {
type hint;
file "db.cache";
};

END--------------------------------------------

2.named.macsolutions.co.uk


macsolutions.co.uk. IN SOA macsolutions.co.uk. administrator.macsolutions.co.uk. (
1 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day



NS macsolutions.macsolutions.co.uk.

macsolutions.macsolutions.co.uk. A 10.0.1.2
router.macsolutions.co.uk. A 10.0.1.1
powerbook.macsolutions.co.uk. A 10.0.1.3
pcbase.macsolutions.co.uk. A 10.0.1.4
desktop.macsolutions.co.uk A 10.0.1.5

macsolutions.co.uk. MX 10 macsolutions.macsolutions.co.uk.
macsolutions.co.uk. MX 20 relay.myisp.net.

www.macsolutions.co.uk. CNAME macsolutions.macsolutions.co.uk.

END--------------------------------------------