LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem resolved DNS (https://www.linuxquestions.org/questions/linux-networking-3/problem-resolved-dns-894412/)

sameone 07-29-2011 12:53 AM

Problem resolved DNS
 
Server Linux suse 11

IP 192.168.2.22 /24 mail4.zimbra.si - in DMZ

gateway 192.168.2.1

hostname: mail4
domain name: zimbra.si

resolved in the world
IP (external): 84.255.0.0 - mail.zimbra.si
DNS (external): 84.0.0.1 and 84.0.0.2


my named.conf

options {

forwarders { 84.0.0.1; 84.0.0.2; };
};



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 "/etc/rndc.key";
// We are the master server for server.example.com
zone "mail4.zimbra.si" {
type master;
file "/etc/bind/db.mail4.zimbra.si";
};

include "/etc/named.conf.include";



db.mail4.zimbra.si

;
; Addresses and other host information.
;
@ IN SOA mail4.zimbra.si. root.mail4.zimbra.si. (
10119 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
IN NS 192.168.2.22
IN MX 10 mail.zimbra.si.
mail IN A 192.168.2.22


LOGS

cat /etc/hosts I don't now way I have 127.0.0.2 -> I commet !!

127.0.0.1 localhost.localdomain localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
#127.0.0.2 mail4.zimbra.si mail4
192.168.2.22 mail4.zimbra.si mail4


cat /etc/resolv.conf
search zimbra.si
nameserver 192.168.2.22


nslookup zimbra.si

Server: 192.168.2.22
Address: 192.168.2.22#53

Non-authoritative answer:
*** Can't find zimbra.si: No answer


dig zimbra.si mx

; <<>> DiG 9.5.0-P2 <<>> zimbra.si mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45378
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;zimbra.si. IN MX

;; ANSWER SECTION:
zimbra.si. 47737 IN MX 10 mail.zimbra.si.
zimbra.si. 47737 IN MX 20 mx2.t-2.net.
zimbra.si. 47737 IN MX 30 fw.datalab.si.

;; AUTHORITY SECTION:
zimbra.si. 63442 IN NS fwimp.alcad.si.
zimbra.si. 63442 IN NS drava.pronet.si.

;; ADDITIONAL SECTION:
mail.zimbra.si. 11888 IN A 84.255.0.0

;; Query time: 22 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Thu Jul 28 13:23:06 2011
;; MSG SIZE rcvd: 171


dig zimbra.si any

; <<>> DiG 9.5.0-P2 <<>> zimbra.si any
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53297
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;zimbra.si. IN ANY

;; ANSWER SECTION:
zimbra.si. 63334 IN NS fwimp.alcad.si.
zimbra.si. 63334 IN NS drava.pronet.si.
zimbra.si. 47629 IN MX 20 mx2.t-2.net.
zimbra.si. 47629 IN MX 30 fw.datalab.si.
zimbra.si. 47629 IN MX 10 mail.zimbra.si.

;; AUTHORITY SECTION:
zimbra.si. 63334 IN NS fwimp.alcad.si.
zimbra.si. 63334 IN NS drava.pronet.si.

;; ADDITIONAL SECTION:
mail.zimbra.si. 11780 IN A 84.255.0.0

;; Query time: 1 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Thu Jul 28 13:24:54 2011
;; MSG SIZE rcvd: 199



Please help and thanks

bathory 07-29-2011 03:44 AM

Hi,

You don't say what exactly is your problem. Note that the dig results from here, are completely different from those you've posted. You can check them here.
Anyway in the zone file you've posted, the zone name should be zimbra.si (and not mail4.zimbra.si) and the the NS record is wrong
Quote:

IN NS 192.168.2.22
It should be something like:
Code:

          IN NS mail4.zimbra.si.
mail4 IN A 192.168.2.22

Another thing that is not correct, is the external IP of mail.zimbra.si (84.255.0.0). It cannot be a host IP, as the 1st IP is reserved for the network/subnet to where that host belongs.

sameone 07-29-2011 04:48 AM

Thanks for answer.

My problem is than I can't nslookup zimbra.si (And I need that for installing zimbra 7.0)

I saw that -> http://wiki.zimbra.com/wiki/Split_DNS


How do you thing that my external IP of mail.zimbra.si (84.255.0.0.) is not correct. I don't use this IP, this only means that my Provider has MX and A record for mail.zimbra.si (84.255.0.0).

Could I become your private e-mail, then i can sand your my real data, new I change some (only the names)

Thanks

bathory 07-29-2011 08:24 AM

Hi,

Quote:

My problem is than I can't nslookup zimbra.si (And I need that for installing zimbra 7.0)
To resolve zimbra.si, you have to add an A record for it in the zone file:
Code:

@ IN A 192.168.2.22
Please note that's not a big deal, as you need the MX record of the zimbra.si zone and its respective A record, which you do have already.

If you want to implement a split dns, then better have a look here.

As I told you 84.255.0.0 is not a valid host IP, as the first IP of a subnet is reserved to the subnet itself. Read this for details about networking.

sameone 07-30-2011 07:49 AM

Thanks for your time

Please look if thats is OK

db.mail4.zimbra.si

;
; Addresses and other host information.
;
@ IN SOA mail4.zimbra.si. root.mail4.zimbra.si. (
10119 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
@ IN A 192.168.2.22
IN NS mail4.zimbra.si.
mail4 IN A 192.168.2.22
IN MX 10 mail.zimbra.si.
mail IN A 192.168.2.22


This I don't anderstand
As I told you 84.255.0.0 is not a valid host IP, as the first IP of a subnet is reserved to the subnet itself.

I don't use this IP (84.255.0.0) this is from my Provider. What is my valid IP ? What I have to change ?

The Zimbra mail server would not work if I can't do nslookup zimbra.si (my domain).

Thanks

bathory 07-30-2011 08:30 AM

You didn't increase the serial (it's still 10119 as in your 1st post). Here is the updated zone file, formatted inside CODE tags for better readability:
Code:

@ IN SOA mail4.zimbra.si. root.mail4.zimbra.si. (
  10120 ; Serial
  43200 ; Refresh
  3600 ; Retry
  3600000 ; Expire
  2592000 ) ; Minimum
; Define the nameservers and the mail servers
  IN NS mail4.zimbra.si.
  IN MX 10 mail.zimbra.si.
@ IN A 192.168.2.22
mail4 IN A 192.168.2.22
mail IN A 192.168.2.22

Note that blank space(s) in the beginning of the lines above are important.
Also you still insist to use the mail4.zimbra.si zone. You need just the zone zimbra.si, and in that zone you define the mail4.zimbra.si host.

Quote:

I don't use this IP (84.255.0.0) this is from my Provider. What is my valid IP ? What I have to change ?
You mentioned that IP in your 1st post. I cannot tell what IPs/subnet your ISP has assigned to you.
Once again though, your domain from outside looks ok according to this. Only that the various IPs are different from those mentioned by you.

sameone 08-01-2011 01:19 AM

Thanks for your help

Yes I now I have to increase number.

Also you still insist to use the mail4.zimbra.si zone. You need just the zone zimbra.si, and in that zone you define the mail4.zimbra.si host.

Where I have to change this ?? from mail4.zimbra.si to zimbra.si



Could I wrote to your private e-mail, then can I tell you precise informaction about my IP, about Provider,..

bathory 08-01-2011 03:14 AM

Quote:

Also you still insist to use the mail4.zimbra.si zone. You need just the zone zimbra.si, and in that zone you define the mail4.zimbra.si host.

Where I have to change this ?? from mail4.zimbra.si to zimbra.si
You should change it in named.conf:
Code:

zone "zimbra.si" {
type master;
file "/etc/bind/db.mail4.zimbra.si";
};

Quote:

Could I wrote to your private e-mail, then can I tell you precise informaction about my IP, about Provider,..
You can if you want, but I don't see any reason to do so. You're trying to setup a mail server using private IPs, that are not reachable from the internet, so the info posted here cannot do any harm.

sameone 08-01-2011 04:28 AM

Thanks one time more, but I still have the problem. Please see my data


I still have the problem with nslookup my domain. Where is the problem

mail4:~ # nslookup zimbra.si
Server: 192.168.2.22
Address: 192.168.2.22#53

Non-authoritative answer:
*** Can't find zimbra.si: No answer


NEW DATA

Server Linux suse 11

IP 192.168.2.22 /24 mail4.zimbra.si - in DMZ

gateway 192.168.2.1

hostname: mail4
domain name: zimbra.si

resolved in the world
IP (external): 84.255.0.0 - mail.zimbra.si
DNS (external): 84.0.0.1 and 84.0.0.2


my named.conf

options {

forwarders { 84.0.0.1; 84.0.0.2; };
};



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 "/etc/rndc.key";
// We are the master server for server.example.com
zone "zimbra.si" {
type master;
file "/etc/bind/db.mail4.zimbra.si";
};

include "/etc/named.conf.include";




db.mail4.zimbra.si

;
; Addresses and other host information.
;
@ IN SOA mail4.zimbra.si. root.mail4.zimbra.si. (
10659 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
IN NS mail4.zimbra.si.
IN MX 10 mail.zimbra.si.
@ IN A 192.168.2.22
mail4 IN A 192.168.2.22
mail IN A 192.168.2.22




mail4:~ # dig zimbra.si mx

; <<>> DiG 9.5.0-P2 <<>> zimbra.si mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39891
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 3

;; QUESTION SECTION:
;zimbra.si. IN MX

;; ANSWER SECTION:
zimbra.si. 73534 IN MX 10 mail.zimbra.si.
zimbra.si. 73534 IN MX 20 mx2.t-2.net.
zimbra.si. 73534 IN MX 30 fw.datalab.si.

;; AUTHORITY SECTION:
zimbra.si. 81274 IN NS drava.pronet.si.
zimbra.si. 81274 IN NS fwimp.alcad.si.

;; ADDITIONAL SECTION:
mail.zimbra.si. 74062 IN A 84.255.195.106
drava.pronet.si. 3163 IN A 193.77.125.2
fwimp.alcad.si. 163 IN A 193.95.254.66

;; Query time: 1 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Mon Aug 1 11:16:42 2011
;; MSG SIZE rcvd: 203


mail4:~ # dig zimbra.si any

; <<>> DiG 9.5.0-P2 <<>> zimbra.si any
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32219
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 2, ADDITIONAL: 3

;; QUESTION SECTION:
;zimbra.si. IN ANY

;; ANSWER SECTION:
zimbra.si. 81156 IN NS drava.pronet.si.
zimbra.si. 81156 IN NS fwimp.alcad.si.
zimbra.si. 73416 IN MX 30 fw.datalab.si.
zimbra.si. 73416 IN MX 10 mail.zimbra.si.
zimbra.si. 73416 IN MX 20 mx2.t-2.net.

;; AUTHORITY SECTION:
zimbra.si. 81156 IN NS drava.pronet.si.
zimbra.si. 81156 IN NS fwimp.alcad.si.

;; ADDITIONAL SECTION:
drava.pronet.si. 3045 IN A 193.77.125.2
fwimp.alcad.si. 45 IN A 193.95.254.66
mail.zimbra.si. 73944 IN A 84.255.195.106

;; Query time: 1 msec
;; SERVER: 192.168.2.22#53(192.168.2.22)
;; WHEN: Mon Aug 1 11:18:40 2011
;; MSG SIZE rcvd: 231

bathory 08-01-2011 05:17 AM

Quote:

mail4:~ # nslookup zimbra.si
Server: 192.168.2.22
Address: 192.168.2.22#53

Non-authoritative answer:
*** Can't find almont.si: No answer
Where did this almont.si came out? I think you've somehow mixed 2 domains in your post!

sameone 08-01-2011 06:25 AM

My mistake when I wrote.

mail4:~ # nslookup zimbra.si
Server: 192.168.2.22
Address: 192.168.2.22#53

Non-authoritative answer:
*** Can't find zimbra.si: No answer

bathory 08-01-2011 06:48 AM

Do you reload bind after editing the zone file?
You need to do this, so bind can read the changes done in the zone in question.

sameone 08-01-2011 08:23 AM

Do you reload bind after editing the zone file?

How can I reload bind ? I just restart computer.

Are my A in MX record OK ?

sameone 08-01-2011 08:26 AM

If I nslookup my domain (zimbra.si - this is not my domain), this domain is registered by provider, then I think MX and A record are OK.

But when I nslookup my hostname (mail4), then is a problem

Non-authoritative answer:
*** Can't find zimbra.si: No answer

bathory 08-01-2011 08:54 AM

Quote:

Originally Posted by sameone (Post 4430641)
How can I reload bind ? I just restart computer.

You can use:
Code:

rndc reload
if you have configured rndc (which I don't see in your named.conf). Or else depending on distro you can use
Code:

service named restart
Code:

Are my A in MX record OK ?
How should I know if they are ok? If you run "dig mx zimbra.si", replacing zimbra.si with your real domain and you get an answer with the MX RR and its A RR, like
Code:

dig mx zimbra.si
...
;; ANSWER SECTION:
zimbra.si.              86400  IN      MX mail.zimbra.si
...
mail.zimbra.si.      86400  IN      A    192.168.2.22

then it's ok


Quote:

But when I nslookup my hostname (mail4), then is a problem

Non-authoritative answer:
*** Can't find zimbra.si: No answer
Your server thinks it's not authoritative for that domain and no answer means it can't find the host in question. Run
Code:

dig -t axfr zimbra.si
and check the output.
Maybe you're editing the wrong zone file, since you cannot see the changes you're doing to the zone file.


All times are GMT -5. The time now is 11:58 AM.