importing DNS

Discuss Networking
User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

importing DNS

Post by cdhgold »

I'm running SUSE 9.0 on DSL with a static IP. I'm running my own DNS server. A friend who runs his own ISP is my secondary DNS and he made some corrections to my DNS since the system that was running my DNS is down due to hardware problem(Netware6). My question is this how can i import the DNS files he sent me into linux to keep from having to set it up manually?

Chris

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Normally if you are running a primary/secondary DNS server you would want to set them up as such (master/slave). Then the changes on the primary "automatically" get propogated to the secondary (slave). Can I assume you both are running BIND? If so, what format is the DNS data that he gave you, are they the actual Zone files? If so, just replace your existing zone files with the ones he gave you (assuming they should contain the same data).

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

yes we are both using bind. he is the secondary and i was the primary until my nw6 server hardware died so there are no exisiting zone files. yes he did send me the zone files. i have copied the zone files to the master folder under named. is that all there is to do because when i bring up the suse dns server tool it does not show the zones. what am i missing? do the file names have to end in .zone ?

chris

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

The zone file names have to match what are defined in your /etc/named.conf but they can be named anything. Can you post a copy of your named.conf?

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

am typing this reply at work .. will check my named.conf tonight modify it as needed and psot if any problems thanks again void

chris

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

here is my named.conf .. i'ms till unsure of where to list my domains in it.

options {

# The directory statement defines the name server's working directory

directory "/var/lib/named";

# Write dump and statistics file to the log subdirectory. The
# pathenames are relative to the chroot jail.

dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";

# The forwarders record contains a list of servers to which queries
# should be forwarded. Enable this line and modify the IP address to
# your provider's name server. Up to three servers may be listed.

#forwarders { 192.0.2.1; 192.0.2.2; };

# Enable the next entry to prefer usage of the name server declared in
# the forwarders section.

#forward first;

# The listen-on record contains a list of local network interfaces to
# listen on. Optionally the port can be specified. Default is to
# listen on all interfaces found on your system. The default port is
# 53.

#listen-on port 53 { 127.0.0.1; };

# The listen-on-v6 record enables or disables listening on IPv6
# interfaces. Allowed values are 'any' and 'none' or a list of
# addresses.

listen-on-v6 { any; };

# The next three statements may be needed if a firewall stands between
# the local server and the internet.

#query-source address * port 53;
#transfer-source * port 53;
#notify-source * port 53;

# The allow-query record contains a list of networks or IP addresses
# to accept and deny queries from. The default is to allow queries
# from all hosts.

#allow-query { 127.0.0.1; };

# If notify is set to yes (default), notify messages are sent to other
# name servers when the the zone data is changed. Instead of setting
# a global 'notify' statement in the 'options' section, a separate
# 'notify' can be added to each zone definition.

notify no;
};

# To configure named's logging remove the leading '#' characters of the
# following examples.
#logging {
# # Log queries to a file limited to a size of 100 MB.
# channel query_logging {
# file "/var/log/named_querylog"
# versions 3 size 100M;
# print-time yes; // timestamp log entries
# };
# category queries {
# query_logging;
# };
#
# # Or log this kind alternatively to syslog.
# channel syslog_queries {
# syslog user;
# severity info;
# };
# category queries { syslog_queries; };
#
# # Log general name server errors to syslog.
# channel syslog_errors {
# syslog user;
# severity error;
# };
# category default { syslog_errors; };
#
# # Don't log lame server messages.
# category lame-servers { null; };
#};

# The following zone definitions don't need any modification. The first one
# is the definition of the root name servers. The second one defines
# localhost while the third defines the reverse lookup for localhost.

zone "." in {
type hint;
file "root.hint";
};

zone "localhost" in {
type master;
file "localhost.zone";
};

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

# Include the meta include file generated by SuSEconfig.named. This includes
# all files as configured in NAMED_CONF_INCLUDE_FILES from
# /etc/sysconfig/named

include "/etc/named.conf.include";
zone "addicted2tech.com" in {
file "master/addicted2tech.com";
type master;
};

# You can insert further zone records for your own domains below or create
# single files in /etc/named.d/ and add the file names to
# NAMED_CONF_INCLUDE_FILES.
# See /usr/share/doc/packages/bind/README.SuSE for more details.

thanks for the help
chris

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Assuming that the named.conf is a working one (that you actually had in use) the line:

Code: Select all

 directory "/var/lib/named";
says that your zone file names will be in relation to this directory. The line:

Code: Select all

include "/etc/named.conf.include";
means to also include statements that reside in "named.conf.include" so if that file actually contains anything I would like to see it as well. Your actual zone "addicted2tech.com":

Code: Select all

zone "addicted2tech.com" in {
file "master/addicted2tech.com";
type master;
};
says that the zone file should be named "/var/lib/named/master/addicted2tech.com" assuming the "directory" statement that I mentioned first is not changed in that "named.conf.include" file. Also, that zone file must be readable by the user that the named process is running under (usually user "named"). If this doesn't solve your problem feel free to upload all of the files in question to my anonymous FTP server to the uploads directory. Note that after you upload them you will not see them in the directory but they will be there for me to get (security by obscurity).

The files I would be interested in for now would be your "named.conf", "named.conf.include", "addicted2tech.com", "localhost.zone", "127.0.0.zone", and your "root.hint". With these I should be able to create a working setup and tar them up and get them back to you.

Another great place to look to figure out your problem is in your log (usually /var/log/messages). If you have verified all of your files are in the proper place and the permissions are right restart named and then look in your messages log for problems associated with "named". Many times this will give you the exact answer you need.

EDIT: I just noticed that you mentioned that your zone doesn't show up in SuSE's DNS tool. I have to admit that I don't use any graphical DNS tools. Red Hat also comes with one but I don't use it. I opt for editing the zone files directly. I believe the Red Hat graphical tool also will not display zones if they have been manually edited. Usually if you get the zone file from a slave server it will contain all of the data but not formatted in any way that a graphical tool might expect it to be physically formated.. Probably the only way to get it to work in your graphical tool is to recreate the zone and manually add the records again using the graphical tool. I assume you only have a few so it shouldn't be too hard. Just open the zone file and see what's in it, then manually add the records in your graphical tool then restart named.

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

what is the ftp site. sorry has taken awhile to resoond but been busy and not having much luck. thank again for all the help you give us all

Chris

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

voidmain.is-a-geek.net :)

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

i feel like jackass for asking that last question .. brain cramp .. files are uploaded to your upload directory .. the files except for the named. files were in /var/lib/named and the named. files were in var/lib/named/etc if that helps my server should be the master name server for both domains. thanks again void

chris

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

I am assuming the only domain you care about is addicted2tech.com. It looks like you have your domain record pointing to 3 DNS servers:

Code: Select all

downtown.inu.net        internet address = 63.151.3.248
hometown.inu.net        internet address = 63.151.3.249
phoenix.addicted2tech.com       internet address = 66.47.111.57
It appears that the server that your files came from are from "phoenix.addicted2tech.com" at 66.47.111.57 right? If those other two servers don't end up getting the same information as phoenix then people will have problems resolving your addresses even after we get this one going.

Now, I have copied your files into their proper locations on my machine and fired up named and they seemed to work just fine so the next step would be to have you restart your named service and check the system log for error messages. Copying the output from this should do it:

Code: Select all

# grep named /var/log/messages | tail -25

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

my friend who created the files runs the 2 servers at inu.net it is his isp so those 2 servers already have these zone files on them. i also need the domain of triplecandb.com to resolve correctly. both web sites are hosted off the same 66.X.X.X ip address. i know the zone fiels are right but was not sure where to put them in my file structure ( is the folder i uploaded them form the right folder for them to be in?) and how to tell they were working. i will refire named up tonight and get the output you suggested. thanks

chris

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

There is no way for me to tell where you uploaded them "from". I can only take your word on that. I explained where each file should be in my previous posts. The actual zone files for your domains need to go in your /var/lib/named/master directory according to your named.conf configuration. Actually, your named.conf doesn't even have the triplecandb.com zone defined so you'll have to add that right under your addicted2tech.com zone definition:

Code: Select all

zone "triplecandb.com" in {
        file "master/triplecandb.com";
        type master;
};
You will also likely need the reverse file before the registrar will accept your server (so your server can reverse lookup it's own IP address). So your 66.47.111 file should also go in /var/www/named/master and a reverse zone created:

Code: Select all

zone "111.47.66.in-addr.arpa" in {
        type master;
        file "master/66.47.111";
};
I really need to see your log messages as I said before I can tell anything more. That will tell me if you have your files in the proper places, whether the permissions are right, etc, etc.

EDIT: I have created an archive file containing all of your files that you gave me and I added the above zone. When you extract it you should see the proper directory structure. Here is the file:

http://voidmain.is-a-geek.net/files/mis ... ld_dns.tgz

You did not send the "localhost.zone" and "120.0.0.zone" files but they should go in /var/lib/named. Again, log files should tell the tale..

User avatar
cdhgold
administrator
administrator
Posts: 382
Joined: Tue Mar 18, 2003 6:11 pm
Location: Texas

Post by cdhgold »

thanks a bunch void here is the log out put you requested after i copied your archive over and restarted named

jose:/ # grep named /var/log/messages | tail -25
Jan 18 11:57:16 jose named[3464]: zone addicted2tech.com/IN: has no NS records
Jan 18 11:57:17 jose named[3464]: zone localhost/IN: loaded serial 42
Jan 18 11:57:17 jose named[3464]: running
Feb 7 15:44:52 jose named[3464]: shutting down
Feb 7 15:44:52 jose named[3464]: stopping command channel on 127.0.0.1#953
Feb 7 15:44:52 jose named[3464]: no longer listening on ::#53
Feb 7 15:44:52 jose named[3464]: no longer listening on 127.0.0.1#53
Feb 7 15:44:52 jose named[3464]: no longer listening on 10.40.12.20#53
Feb 7 15:44:53 jose named[3462]: exiting
Feb 7 15:44:54 jose named[15860]: starting BIND 9.2.2 -t /var/lib/named -u named
Feb 7 15:44:54 jose named[15860]: using 1 CPU
Feb 7 15:44:55 jose named[15862]: loading configuration from '/etc/named.conf'
Feb 7 15:44:55 jose named[15862]: listening on IPv6 interfaces, port 53
Feb 7 15:44:55 jose named[15862]: listening on IPv4 interface lo, 127.0.0.1#53
Feb 7 15:44:55 jose named[15862]: binding TCP socket: address in use
Feb 7 15:44:55 jose named[15862]: listening on IPv4 interface eth0, 10.40.12.20#53
Feb 7 15:44:55 jose named[15862]: binding TCP socket: address in use
Feb 7 15:44:55 jose named[15862]: command channel listening on 127.0.0.1#953
Feb 7 15:44:55 jose named[15862]: command channel listening on ::1#953
Feb 7 15:44:55 jose named[15862]: zone 0.0.127.in-addr.arpa/IN: loaded serial 42
Feb 7 15:44:55 jose named[15862]: zone 111.47.66.in-addr.arpa/IN: loaded serial 2003101000
Feb 7 15:44:55 jose named[15862]: zone addicted2tech.com/IN: loaded serial 2003102000
Feb 7 15:44:55 jose named[15862]: zone triplecandb.com/IN: loaded serial 2003102000
Feb 7 15:44:55 jose named[15862]: zone localhost/IN: loaded serial 42
Feb 7 15:44:55 jose named[15862]: running

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Ok, everything looks good huh? I just used nslookup to query your server and it seems to be resolving the names properly and there are no errors in the log.

Post Reply