LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-22-2008, 04:52 PM   #61
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122

Have you got those search entries correct (I wouldn't expect the ns1 part). I also think these go on one line.

Reading man resolv.conf, I suspect that you can only list one domain. Note that domain and search are mutually exclusive.

There is no point replicating the nameserver entries.

Have a read on man resolv.conf
 
Old 09-22-2008, 05:00 PM   #62
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
ok I modified resolv.conf to just:

Code:
domain optiplex-networks.com
search optiplex-networks.com
nameserver 192.168.1.51
I think that's what the file meant? Then I restart bind but still no luck?
 
Old 09-22-2008, 05:04 PM   #63
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
I was thinking perhaps changing the:

Code:
 type master;
statement in the named.conf file to read:

Code:
 type master {127.0.0.1} ;
Have no idea if it would work though or just get the system to think that 127.0.0.1 is secondary DNS?
 
Old 09-22-2008, 05:17 PM   #64
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Using dig the results are as follows:

Code:
; <<>> DiG 9.3.4-P1.1 <<>> @localhost optiplex-networks.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65354
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;optiplex-networks.com.         IN      A

;; ANSWER SECTION:
optiplex-networks.com.  3600    IN      A       81.178.2.118

;; AUTHORITY SECTION:
optiplex-networks.com.  10800   IN      NS      ns1.active-dns.com.
optiplex-networks.com.  10800   IN      NS      ns2.active-dns.com.

;; Query time: 564 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 23 01:14:26 2008
;; MSG SIZE  rcvd: 102
That should be fine for someone outside my local network but internally it should have ns1.optiplex-networks.com for NS record.
 
Old 09-22-2008, 05:35 PM   #65
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you saying that ns1 and ns2 should return different IP's? Why do you expect an internal query to return ns1 in preference to ns2 if that's the case?

Change your zone file so that only ns1 can be returned and see what happens.
 
Old 09-22-2008, 05:45 PM   #66
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Ok this is the strange part maybe I'm doing something wrong I don't know, however;

previously I had my router acting as the local DNS server so that internally my domain.com would resolve without even needing to contact the WAN DNS servers for my domain which are provided by the company I got my domain from. So to make it clear ns1 and ns2 .active-dns.com were the DNS servers acting for anyone outside my local subnet.

Now I am trying to do the same with my server, as the router was becoming too overloaded acting as router/gateway + DNS server + telnet and SSH server all at once.

All I want really is that when I do say an nslookup of mydomain.com I get the correlating IP address not my WAN address!

Code:
Server:         192.168.1.51
Address:        192.168.1.51#53

Non-authoritative answer:
Name:   optiplex-networks.com
Address: 81.178.2.118
which should be 192.168.1.50 instead of 81.178.2.118.

Also if I run ping mydomain.com from a local machine on my network I should recieve contact from 192.168.1.50, however I get this instead:

Code:
PING optiplex-networks.com (81.178.2.118) 56(84) bytes of data.
64 bytes from 81-178-2-118.dsl.pipex.com (81.178.2.118): icmp_seq=1 ttl=255 time=1.07 ms
64 bytes from 81-178-2-118.dsl.pipex.com (81.178.2.118): icmp_seq=2 ttl=255 time=1.11 ms
64 bytes from 81-178-2-118.dsl.pipex.com (81.178.2.118): icmp_seq=3 ttl=255 time=1.07 ms
64 bytes from 81-178-2-118.dsl.pipex.com (81.178.2.118): icmp_seq=4 ttl=255 time=1.11 ms
64 bytes from 81-178-2-118.dsl.pipex.com (81.178.2.118): icmp_seq=5 ttl=255 time=1.10 ms

--- optiplex-networks.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4014ms
rtt min/avg/max/mdev = 1.076/1.096/1.114/0.033 ms
 
Old 09-22-2008, 05:48 PM   #67
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
To me this means that the DNS server is running passivly not actively, maybe authority is the right word here but certainly it's just resolving not hosting I guess!!
 
Old 09-22-2008, 06:02 PM   #68
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You have me a bit confused. You have 4 nameservers listed in yoru zone file. Are you saying some of these resolve to external IP's and some to internal?
 
Old 09-22-2008, 06:10 PM   #69
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Hehe, sorry I think I got myself confused more then you!

I modified the zone files;

Code:
;
; BIND data file for example.com
;
$TTL    604800
@       IN      SOA     ns1.optiplex-networks.com. info.optiplex-networks.com. (                            2008092201         ; Serial
                                  7200         ; Refresh
                                   120         ; Retry
                               2419200         ; Expire
                                604800)        ; Default TTL
;
@       IN      NS      ns1.optiplex-networks.com.
optiplex-networks.com.    IN      MX      10      mail.optiplex-networks.com.
optiplex-networks.com.    IN      A       192.168.1.50
gx110.optiplex-networks.com.    IN     A      192.168.1.51
www.optiplex-networks.com       IN      A       192.168.1.50
mail.optiplex-networks.com              IN      A       192.168.1.50
ftp.optiplex-networks.com       IN      A       192.168.1.51
mail.gx110.optiplex-networks.com        IN      A       192.168.1.51
ferrari3200.optiplex-networks.com       IN      A       192.168.1.5
optiplex-networks.com.   IN      TXT     "v=spf1 ip4:192.168.1.50 a mx ~all"
mail                    IN      TXT     "v=spf1 a -all"
Code:
$TTL 1d ;
$ORIGIN 254.168.192.IN-ADDR.ARPA.
@       IN      SOA     ns1.optiplex-networks.com.   info.optiplex-networks.com. (
                                       2008092101
                                       7200
                                       120
                                       2419200
                                       604800
)
        IN      NS      ns1.optiplex-networks.com.
1       IN      PTR     ns1.optiplex-networks.com.
I just want 1 DNS server basically on my network to perform lookups for my local domain and also to translate WAN domain info. Exactly like my Cisco router was performing.

I guess describing by bad sudo code:
{
If domain on LAN then resolve to local IP
or If not on LAN then resolve to WAN
}
 
Old 09-22-2008, 06:18 PM   #70
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Hmm... originally I had ns1 and ns2 being set to my main server and router. However the router acted as a master for local domain within my LAN so then Win clients were fine resolving both but of course Linux boxes didn't like it.

The other two name servers where for my ISP which if I'm going to have my own DNS I guess I don't need.

Today I took the routers internal DNS server offline so now I am just left with my main server.

Since when I ping from local machine to say my webserver I resolve the WAN IP address as the DNS information seems to be supplied by the external DNS servers directing WAN users to my WAN IP instead of my local DNS server directing the local machine to the web servers internal IP.

I really hope this makes sence now??
 
Old 09-22-2008, 06:46 PM   #71
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Ok, so on the machine you are trying to resolve from, you have the correct nameserver in resolv.conf (if you are digging from the same machine, do you have an external IP or are you using localhost).

Can you reposr the zone file, and the output of dig?
 
Old 09-22-2008, 06:57 PM   #72
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
forward zone file:

Code:
;
; BIND data file for example.com
;
$TTL    604800
@       IN      SOA     ns1.optiplex-networks.com. info.optiplex-networks.com. (                            2008092201         ; Serial
                                  7200         ; Refresh
                                   120         ; Retry
                               2419200         ; Expire
                                604800)        ; Default TTL
;
@       IN      NS      ns1.optiplex-networks.com.
optiplex-networks.com.    IN      MX      10      mail.optiplex-networks.com.
optiplex-networks.com.    IN      A       192.168.1.50
gx110.optiplex-networks.com.    IN     A      192.168.1.51
www.optiplex-networks.com       IN      A       192.168.1.50
mail.optiplex-networks.com              IN      A       192.168.1.50
ftp.optiplex-networks.com       IN      A       192.168.1.51
mail.gx110.optiplex-networks.com        IN      A       192.168.1.51
ferrari3200.optiplex-networks.com       IN      A       192.168.1.5
optiplex-networks.com.   IN      TXT     "v=spf1 ip4:192.168.1.50 a mx ~all"
mail
reverse zone file:

Code:
$TTL 1d ;
$ORIGIN 254.168.192.IN-ADDR.ARPA.
@       IN      SOA     ns1.optiplex-networks.com.   info.optiplex-networks.com. (
                                       2008092101
                                       7200
                                       120
                                       2419200
                                       604800
)
        IN      NS      ns1.optiplex-networks.com.
1       IN      PTR     ns1.optiplex-networks.com.
dig @localhost optiplex-networks.com

Code:
; <<>> DiG 9.3.4-P1.1 <<>> @localhost optiplex-networks.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27298
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;optiplex-networks.com.         IN      A

;; ANSWER SECTION:
optiplex-networks.com.  2274    IN      A       81.178.2.118

;; AUTHORITY SECTION:
optiplex-networks.com.  5649    IN      NS      ns1.active-dns.com.
optiplex-networks.com.  5649    IN      NS      ns2.active-dns.com.

;; Query time: 178 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 23 02:57:11 2008
;; MSG SIZE  rcvd: 102
 
Old 09-22-2008, 07:01 PM   #73
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Oops that was for main server hang on!

resolv.conf file of localhost (Vaio)

Code:
# generated by NetworkManager, do not edit!

nameserver 192.168.1.51



search optiplex-networks.com
dig @localhost optiplex-networks.com

Code:
; <<>> DiG 9.3.4-P1.1 <<>> @localhost optiplex-networks.com
; (1 server found)
;; global options:  printcmd
;; connection timed out; no servers could be reached
dig optiplex-networks.com

Code:
; <<>> DiG 9.3.4-P1.1 <<>> optiplex-networks.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8576
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;optiplex-networks.com.         IN      A

;; ANSWER SECTION:
optiplex-networks.com.  2047    IN      A       81.178.2.118

;; AUTHORITY SECTION:
optiplex-networks.com.  5422    IN      NS      ns1.active-dns.com.
optiplex-networks.com.  5422    IN      NS      ns2.active-dns.com.

;; Query time: 25 msec
;; SERVER: 192.168.1.51#53(192.168.1.51)
;; WHEN: Tue Sep 23 01:00:58 2008
;; MSG SIZE  rcvd: 102
 
Old 09-22-2008, 07:03 PM   #74
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Main server (gx110) gx110.optiplex-networks.com also for DNS ns1.optiplex-networks.com -> IP 192.168.1.51

Workstation localhost (Vaio) -> IP 192.168.1.2
 
Old 09-22-2008, 07:18 PM   #75
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm about to show my lack of knowledge of DNS here. I got mine working fine, but I needed a lot of help from a howto some time ago, and my zone files are in a different format from yours.

However, I don't see quite how you nameserver is meant to resolve. Try adding an A record (or cname if you want) for ns1

Code:
ns1.optiplex-networks.com       IN      A       192.168.1.50
to your zone (is that the correct IP?).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Master Server Configuration in CentOS5.2 rajendrapoudel Linux - Server 41 09-11-2008 03:05 AM
how to configure master dns in windows2003 server and its slave dns in rhel5 suneellinux Linux - Newbie 1 04-11-2008 05:13 PM
DNS Server: Master/Slave Swakoo Linux - Networking 3 06-30-2006 04:58 AM
CAN I MAKE A SECONDARY _(slave) DNS FROM A PRIMARY (master)?? eder_michael11 Linux - General 0 05-29-2006 12:24 PM
Master/Slave server DNS emailssent Linux - Networking 2 10-04-2004 03:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration