Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Suse 9.2 but have used Suse 9.1 Red Hat 5.2 - 9, Linux Defender Live!, Knoppix, Morphix
Posts: 12
Rep:
DNS Configuration
Hi all,
I am having trouble getting DNS going on a web server I am setting up. This is SUSE Linux 9.1 with Apache, MySQL, PHP/Perl used to teach Web Design & Hosting.
I received my "zone file" from my DNS host - Domain Names changed but consistent throughout:
$ttl 18400
@ IN SOA ns1.mydnshost.com.au. postmaster.mydnshost.com.au. (
2004091301
10800
3600
304800
18400 )
NS ns1.mydnshost.com.au.
NS ns2.mydnshost.com.au.
and this is what we (a couple of colleagues and me) came up with:
$TTL 2D
mydomain.com.au. IN SOA ns1.mydnshost.com.au. postmaster.mydnshost.com.au. (
2004091600 ; serial
3H ; refresh
1H ; retry
1W ; expiry
18400 ) ; minimum
@ IN NS ns1.mydnshost.com.au.
@ IN NS ns2.mydnshost.com.au.
localhost IN A 127.0.0.1
computername IN A 192.168.0.2
www IN CNAME 192.168.0.2
www IN CNAME computername.mydomain.com.au.
ftp IN CNAME 192.168.0.2
ftp IN CNAME computername.mydomain.com.au.
saved as /var/lib/named/mydomainname.zone and:
# Copyright (c) 2001-2004 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Frank Bodammer, Lars Mueller <lmuelle@suse.de>
#
# /etc/named.conf
#
# This is a sample configuration file for the name server BIND 9. It works as
# a caching only name server without modification.
#
# A sample configuration for setting up your own domain can be found in
# /usr/share/doc/packages/bind/sample-config.
#
# A description of all available options can be found in
# /usr/share/doc/packages/bind/misc/options.
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.
# 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.
# 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";
# 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.
zone "mydomain.com.au" in {
type master;
file "mydomain.com.au";
};
saved as /etc/named.conf.
From all our reading - SUSE Administration Guide, online, debian, FreeBSD, and others - this should now work. The one problem we have found is if we use nslookup we only get:
zone "mydomain.com.au" in {
type master;
file "mydomain.com.au";
};
The zone file for your domain must be named "/var/lib/named/mydomain.com.au" and not "/var/lib/named/mydomainname.zone" .
Also in that file you must have the A records for your NS1 and NS2. Make the changes, increase the serial and restart named.
1) Where is the reverse lookup zone being loaded? i.e. in-addr.arpa
2) You have CNAME's pointing to IP address. Address records (A) point to IP's, CNAME records should point to names. Like the name of a previously defined address record.
3) Based on my interpretation of your forwarders statement, you are forwarding queries to your own name server, then your ISP's name server. huh?
4) You mentioned "Is the ISP at fault?" in your post. Why would they be at fault if you are configuring your own name server to be a Start of Authority (SOA)? Are they responsible for SOA delgation to your server in some way? I'm confused as to where you are setting up this name server.
BTW: The whois command does not query name servers. If I remeber correctly, whois is a database maintained by all the differenet TLD registrar's.
Also, are you getting any errors logged when you start named? i.e. /var/log/messages on redhat. I don't know how SUSE distro's configure syslog. Named typically logs some descriptive errors on startup to help pinpoint zone file problems.
Distribution: Suse 9.2 but have used Suse 9.1 Red Hat 5.2 - 9, Linux Defender Live!, Knoppix, Morphix
Posts: 12
Original Poster
Rep:
Thanks!!
Thanks for your help - it was a combination of all three things.
I fixed up the NameServer as an A record, dropped the CNAMES pointing at IP addresses and the ISP, who are the Authoritative Name Server as they are hosting my DNS for the static IP ADSL connection used for this web server, did not have an A record for my domain name pointing to the IP address.
That's the exact same documentation, just posted in a different place.
My questions is related to section 4.2
"..As with syslogd, as of Red Hat 7.2 this process is now even easier. There is a file called /etc/sysconfig/named in which extra parameters for syslogd can be defined. The default /etc/rc.d/init.d/named on Red Hat 7.2, however, will check for the existance of /etc/named.conf before starting. You will need to correct this path..."
I added the extra parameters in /etc/sysconfig/named as I stated above, but Bind still looks for it's config file in /etc
I added the extra parameters in /etc/sysconfig/named as I stated above, but Bind still looks for it's config file in /etc
Is your named init script "also" adding the -t /chroot... command line parameter when it checks for the ROOTDIR variable sourced from /etc/sysconfig/named?
When you say... "also" adding the -t /chroot...
I guess I don't know what you mean. Do I have to edit the /etc/rc.d/init.d/named script as well?
I'm just assuming that once I set the varable ROOTDIR in /etc/sysconfig/named, it should get defined in /etc/rc.d/init.d/named, and Bind now starts from somewhere else.
I have never used slackware or mandrake distro's, so I don't know if you need to add the -t parameter to the init script. If they have done their homework, then the supplied init script should be adding the -t parameter when it sees the ROOTDIR variable that was sourced from /etc/sysconfig/named.
There's an easy way to check if named is being started in a chroot'd environment:
# ps auwx | grep named
You should see the -t /chroot.... shown on the command line. If not... then your init script needs to be modified.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.