B.I.N.D. issues.

Issues related to configuring your network
User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: B.I.N.D. issues.

Post by avij » 2014/04/14 20:40:35

Hm, right, you will need to add an A record for ns12.strangefruitradio.net. I didn't know BIND checks that, but it makes sense that there's such a check.

So, add

Code: Select all

ns12   IN  A   212.159.60.105
to your fwd.strangefruitradio.net zone file to remedy this.

As for rev.strangefruitradio.net, you seem to be mixing 192.168.x.x private addresses with a public domain name. I'm not sure that is a particularly good idea. I'd guess you don't even need to have any reverse DNS configuration in your own name server (that is usually taken care by the ISP unless you have hundreds of public IP addresses). So unless you know you need/want reverse DNS, you could comment out that configuration block from named.conf

If you need to have full forward+reverse DNS for your 192.168.x.x private LAN, I'd go with a separate zone for the LAN, like "strangefruitradiointra" or some such.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: B.I.N.D. issues.

Post by avij » 2014/04/14 20:54:18

If you start adding more zones to your BIND configuration, you may also want to consider moving the allow-query and allow-transfer configuration options from the global options to the per-zone configuration options, like

Code: Select all

zone "strangefruitradio.net" IN {
    type master;
    allow-query { 0.0.0.0/0; };
    allow-transfer { 92.27.222.137; };
    file ...
};
This way you can allow queries for your public zone, but limit queries to some specified IP address ranges for private zones.

CharmingNathan
Posts: 155
Joined: 2014/04/09 12:48:55

Re: B.I.N.D. issues.

Post by CharmingNathan » 2014/04/14 21:01:22

avij wrote:Hm, right, you will need to add an A record for ns12.strangefruitradio.net. I didn't know BIND checks that, but it makes sense that there's such a check.

So, add

Code: Select all

ns12   IN  A   212.159.60.105
to your fwd.strangefruitradio.net zone file to remedy this.

As for rev.strangefruitradio.net, you seem to be mixing 192.168.x.x private addresses with a public domain name. I'm not sure that is a particularly good idea. I'd guess you don't even need to have any reverse DNS configuration in your own name server (that is usually taken care by the ISP unless you have hundreds of public IP addresses). So unless you know you need/want reverse DNS, you could comment out that configuration block from named.conf

If you need to have full forward+reverse DNS for your 192.168.x.x private LAN, I'd go with a separate zone for the LAN, like "strangefruitradiointra" or some such.
Hello again avij, right I have followed your directions, including blocking the rev.strangefruitradio.net, and rather annoyingly I am left with a syntax error, when I try and start the service:

[root@nathan-desktop ~]# service named start
Starting named:
Error in named configuration:
/etc/named.conf:51: '}' expected near ';'

Regarding the reverse D.N.S, I think I shall want that in place, as I hope to add a mail server function to this eventually, but D.N.S. is proving to be a big enough headache first! The mixing up with the 192.168.x.x address was my error, it should have been my Public I.P. address I assume, albeit reversed?

CharmingNathan
Posts: 155
Joined: 2014/04/09 12:48:55

Re: B.I.N.D. issues.

Post by CharmingNathan » 2014/04/14 21:02:40

avij wrote:If you start adding more zones to your BIND configuration, you may also want to consider moving the allow-query and allow-transfer configuration options from the global options to the per-zone configuration options, like

Code: Select all

zone "strangefruitradio.net" IN {
    type master;
    allow-query { 0.0.0.0/0; };
    allow-transfer { 92.27.222.137; };
    file ...
};
This way you can allow queries for your public zone, but limit queries to some specified IP address ranges for private zones.
I will bear that tip in mind, avij, but one thing at a time, eh?! ;)

I need to get B.I.N.D. working first...

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: B.I.N.D. issues.

Post by avij » 2014/04/14 21:11:41

You are missing a } near line 51 of your named.conf. Without seeing the file, I don't know what's wrong.

As for reverse DNS, if you don't have a large netblock like a /24 (256 addresses), the reverse DNS config for individual IP addresses is done by your ISP. They may have some sort of a customer settings page, or failing that, you can ask their support to set the reverse DNS to your liking. Currently 212.159.60.105 seems to point to charmingnathan.plus.com.

CharmingNathan
Posts: 155
Joined: 2014/04/09 12:48:55

Re: B.I.N.D. issues.

Post by CharmingNathan » 2014/04/14 21:17:19

avij wrote:You are missing a } near line 51 of your named.conf. Without seeing the file, I don't know what's wrong.

As for reverse DNS, if you don't have a large netblock like a /24 (256 addresses), the reverse DNS config for individual IP addresses is done by your ISP. They may have some sort of a customer settings page, or failing that, you can ask their support to set the reverse DNS to your liking. Currently 212.159.60.105 seems to point to charmingnathan.plus.com.
Yes, I gathered that! I wasn't going to ask you to sort out my syntax as well, but as you presumably are way more used to Linux code than I, here is the section where I believe the error is:

file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

zone "strangefruitradio.net" IN { # FORWARD Zone file and configuration - put in your DOMAINNAME
type master;
file "fwd.strangefruitradio.net";
allow-update { none; };

;};

;zone "1.168.192.in-addr.arpa" IN { # REVERSE Zone file and configuration
; type master;
; file "rev.strangefruitradio.net";
; allow-update { none; };
;};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

Yes that's right, Plus.net are my I.S.P., I was under the impression I had to have reverse D.N.S. in place with a mail server, but you're right I am sure about Plus.net taking care of all that!

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: B.I.N.D. issues.

Post by avij » 2014/04/14 21:23:58

Try this:

Code: Select all

zone "strangefruitradio.net" IN {                # FORWARD Zone file and configuration - put in your DOMAINNAME
        type master;
        file "fwd.strangefruitradio.net";
        allow-update { none; };
};
Also, remove the reverse zone configuration block entirely. If you want to only comment it out, use # or // to comment out individual lines. Don't use semicolons for commenting, they don't work in named.conf for that purpose.

CharmingNathan
Posts: 155
Joined: 2014/04/09 12:48:55

Re: B.I.N.D. issues.

Post by CharmingNathan » 2014/04/14 21:30:56

avij wrote:Try this:

Code: Select all

zone "strangefruitradio.net" IN {                # FORWARD Zone file and configuration - put in your DOMAINNAME
        type master;
        file "fwd.strangefruitradio.net";
        allow-update { none; };
};
Also, remove the reverse zone configuration block entirely. If you want to only comment it out, use # or // to comment out individual lines. Don't use semicolons for commenting, they don't work in named.conf for that purpose.
Is this better?

file "data/named.run";
severity dynamic;
};
};

zone "." IN {;
type hint;
file "named.ca";
};

zone "strangefruitradio.net" IN {; # FORWARD Zone file and configuration - put in your DOMAINNAME
type master;
file "fwd.strangefruitradio.net";
allow-update { none; };

;};

#zone "1.168.192.in-addr.arpa" IN { # REVERSE Zone file and configuration
# type master;
# file "rev.strangefruitradio.net";
# allow-update { none; };
#;};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

I've actually found a few of these syntax errors myself, currently am missing a colon on line 28!

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
listen-on port 53 { 127.0.0.1; 212.159.60.105; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; 0.0.0.0/0; };
allow-transfer { localhost; 0.0.0.0/0; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic"};
};

logging {
channel default_debug {;
file "data/named.run";
severity dynamic;

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: B.I.N.D. issues.

Post by avij » 2014/04/14 21:35:48

It would be better if you actually followed my instructions..

What I wrote:

Code: Select all

zone "strangefruitradio.net" IN { # FORWARD Zone file and configuration - put in your DOMAINNAME
        type master;
        file "fwd.strangefruitradio.net";
        allow-update { none; };
};
What you have in your config:

Code: Select all

zone "strangefruitradio.net" IN {; # FORWARD Zone file and configuration - put in your DOMAINNAME
        type master;
        file "fwd.strangefruitradio.net";
        allow-update { none; };
;};
Spot the differences (there are two). Don't sprinkle the semicolons randomly in your config file, they have a specific purpose.

CharmingNathan
Posts: 155
Joined: 2014/04/09 12:48:55

Re: B.I.N.D. issues.

Post by CharmingNathan » 2014/04/14 21:42:35

avij wrote:It would be better if you actually followed my instructions..

What I wrote:

Code: Select all

zone "strangefruitradio.net" IN { # FORWARD Zone file and configuration - put in your DOMAINNAME
        type master;
        file "fwd.strangefruitradio.net";
        allow-update { none; };
};
What you have in your config:

Code: Select all

zone "strangefruitradio.net" IN {; # FORWARD Zone file and configuration - put in your DOMAINNAME
        type master;
        file "fwd.strangefruitradio.net";
        allow-update { none; };
;};
Spot the differences (there are two). Don't sprinkle the semicolons randomly in your config file, they have a specific purpose.
I actually thought I had, my apologies:

zone "." IN {;
type hint;
file "named.ca";
};

zone "strangefruitradio.net" IN {; # FORWARD Zone file and configuration - put in your DOMAINNAME
type master;
file "fwd.strangefruitradio.net";
allow-update { none; };

};

#zone "1.168.192.in-addr.arpa" IN { # REVERSE Zone file and configuration
# type master;
# file "rev.strangefruitradio.net";
# allow-update { none; };
#;};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

When I try and start:

[root@nathan-desktop ~]# service named start
Starting named:
Error in named configuration:
/etc/named.conf:32: '}' expected near ';'

Post Reply