LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2011, 11:46 AM   #1
isthisyournacho
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Rep: Reputation: Disabled
After ubuntu upgrade, DNS issues


I upgraded all our services from Ubuntu 9.10 to 10.4 and now the internal network keeps looking at our OLD email server to send mail.

I upgraded our email server a month ago, and after the upgrade was done mail was coming here fine. Now after this upgrade it is looking at the old server, 10.1.1.95. (the new is 10.1.1.96.)

Aug 18 12:23:12 SERVER postfix/smtp[32707]: 9023135A1A2: to=<EMAIL>, relay=mail.DOMAIN.com[10.1.1.95]:25, delay=0.28, delays=0.08/0.01/0.02/0.17, dsn=2.6.0, status=sent (250 2.6.0 <20110818162312.GA32693@ORIGINATING-SERVER> Queued mail for delivery)

I've checked /etc/resolv.conf and they are looking at our GoDaddy nameservers. I have done an rdnc flush.

Also.. we have a local nameserver here but I only use that as a backup. Here is my /etc/resolv.conf:

search DOMAIN.com
nameserver 216.69.185.14 (godaddy's nameserver)
nameserver 208.109.255.14 (godaddy's nameserver)
nameserver 10.1.1.121
nameserver 4.2.2.2

How can I make it resolve mail.DOMAIN.com to 10.1.1.96 instead of .95?

Last edited by isthisyournacho; 08-19-2011 at 11:27 AM. Reason: clarification
 
Old 08-18-2011, 05:58 PM   #2
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
So what do you want?
 
Old 08-19-2011, 09:02 AM   #3
isthisyournacho
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
I want the mail to go to 10.1.1.96, not 10.1.1.95. When I do a dig or nslookup it all comes back 10.1.1.95, yet my local nameserver is set to 10.1.1.96.
 
Old 08-19-2011, 10:53 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
This looks to me like something got messed up in the zone file for your local LAN DNS, i.e. the zone file that defines 10.x.x.x. I would look there. If you have any sort of master/slave arrangement it is also possible that you are looking at an older backup zone or a backup server that didn't get updated. Also be sure to check the serial numbers and make sure you don't have updates being undone because they appear to be an older file.
 
1 members found this post helpful.
Old 08-19-2011, 11:25 AM   #5
isthisyournacho
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Here's the contents of the only zone file that it should be looking at.

Code:
root@Internal1:/etc/bind/zones/forward# cat db.DOMAIN.com
$TTL 28800
DOMAIN.com.      IN      SOA     ns1.DOMAIN.com. syslog.DOMAIN.com. (
                                                        2010071301
                                                        28800
                                                        3600
                                                        604800
                                                        38400 )

DOMAIN.com.      IN      NS              ns1.DOMAIN.com.
;
;web servers
@		IN	A 	10.1.1.210
web1		IN	A	10.1.1.210
web10		IN	A	10.1.1.20
web12		IN	A	10.1.1.21
web20		IN	A	10.1.1.125
web21		IN	A	10.1.1.131
;
;internals
internal1	IN	A	10.1.1.121
internal2	IN	A	10.1.1.122
;
;Database servers
mapdb2		IN	A	10.1.1.190
;
;backup servers
mapbak1		IN	A	10.1.1.252
;
;mail servers
mapexch		IN	A	10.1.1.96
;
;other
dev11		IN	A	10.2.1.20
l3map02		IN	A	10.1.1.123
;
;CNAMES
ns1		CNAME	internal1
ldap		CNAME	internal1
mail		CNAME	mapexch
backup		CNAME	mapbak1
www		CNAME	web1

DOMAIN.com.	IN	MX	10	mail.DOMAIN.com.
 
Old 08-19-2011, 02:31 PM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I notice a couple of things, but nothing jumps out at me as immediately obvious. Here are a couple things to look at:
1 - your original post is showing nameserver 10.1.1.121. As this is the name server listed in your private IP space, I assume this is the one that is authoritative for your domain. It looks like this correctly maps via a set of CNAMES, to the server internal1. Similarly, mail maps to mapexch via CNAME which points to your new address. The point I am trying to get at is that an IP / host name on your LAN (using a 10.x.x.x) address will only be resolvable via your DNS, which looks like it is correct. GoDaddy should only be resolving your public domains. I am not sure about the 4.2.2.2. It resolves to vnsc-bak.sys.gtei.net, which I am guessing is your provider.

2 - Interestingly, the .95 address doesn't appear in this zone file at all. This leaves me to wonder what server is returning this address? When you perform an nslookup and get the old address, what does it list above the result on the server line (where it says server: and underneath it address. This will tell you what returned the result.

3 - You can do some tests and specify which nameserver to use, typing 'server <name of the server>' at the nslookup command prompt '>' This will let you see if you get different results from different sources.
 
1 members found this post helpful.
Old 08-22-2011, 11:13 AM   #7
isthisyournacho
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
That's what is weird.. everything seems to return the wrong thing just for mail.DOMAIN.com.

Code:
root@Internal1:~# nslookup DOMAIN.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   DOMAIN.com
Address: 64.124.160.92

root@Internal1:~# cat /etc/resolv.conf
search DOMAIN.com
nameserver 8.8.8.8
nameserver 10.1.1.121
nameserver 10.1.1.122

root@Internal1:~# nslookup mail.DOMAIN.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   mail.DOMAIN.com
Address: 10.1.1.95
Trying 4.2.2.2, I get this:

Code:
root@Internal1:~# nslookup server 4.2.2.2 mail.DOMAIN.com
Server:         mail.DOMAIN.com
Address:        10.1.1.96#53

** server can't find server: SERVFAIL
So that's the correct address - but I get the SERVFAIL and a dig to that same server returns 10.1.1.95, the incorrect address... I'm not sure where else to look.
 
Old 08-23-2011, 12:58 AM   #8
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Quote:
Originally Posted by isthisyournacho View Post
mail CNAME mapexch
backup CNAME mapbak1
www CNAME web1

DOMAIN.com. IN MX 10 mail.DOMAIN.com.
[/CODE]
Here's a bit from DNS-HOWTO:
Quote:
But it's safe to follow the rule that a MX, CNAME or SOA record should never refer to a CNAME record, they should only refer to something with an A record...
This thought is confirmed here.

So I'm no expert in this matter, but here's what the HOWTO says and here your MX record is pointing to a CNAME record.

Another thing, only a guess though, but could it be that your computers have old /etc/hosts files having mailserver as "10.1.1.95" and /etc/nsswitch.conf saying
Quote:
hosts files dns
which makes them look first into files and only then via DNS?
Although I'm not sure that nslookup follows this rule... but I don't see why it shouldn't.
EDIT.Wrong , as the nslookup command above is querying a server anyway.

I mean, in any case, when the cause of the problem isn't clear it is good to review every possibility...

Last edited by kostya; 08-23-2011 at 03:17 AM.
 
Old 08-23-2011, 03:23 AM   #9
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
OK, another thought.

From your post #7 I can see that your server 4.2.2.2 returns the right address, while the 8.8.8.8 is returning the wrong one.
Now the zone file from post #5 is taken from 4.2.2.2 I assume? And what does 8.8.8.8 have, so that it returns the wrong one?
 
Old 08-23-2011, 07:45 AM   #10
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Typically SERVFAIL means that there is a syntax error or something similar wrong with the zone file. Is this DNS under your control? If so, I would restart (bind?) and then look carefully at the syslog for any errors or warnings that help point out the problem.

8.8.8.8 is Google's public DNS. Since this is returning the old address, this tells me that it is likely wrong at the registrar level. Do you use a registrar's DNS or did you declare your own DNS to be the authoritative one(s) for the domain? In any case, I would double check what is on file there.
 
Old 08-25-2011, 09:56 AM   #11
isthisyournacho
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
I really appreciate everyone's help so far. I am definitely a novice with DNS it turns out.

I believe I mislead - 4.2.2.2 and 8.8.8.8 return the same thing inside the network, and a different thing outside.

Inside:

Code:
; <<>> DiG 9.7.0-P1 <<>> @4.2.2.2 mail.DOMAIN.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6944
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.DOMAIN.com.           IN      A

;; ANSWER SECTION:
mail.DOMAIN.com.    2168    IN      A       10.1.1.95

;; Query time: 8 msec
;; SERVER: 4.2.2.2#53(4.2.2.2)
;; WHEN: Thu Aug 25 10:37:43 2011
;; MSG SIZE  rcvd: 53
Outside:

Code:
; <<>> DiG 9.7.0-P1 <<>> @4.2.2.2 mail.DOMAIN.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14934
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.DOMAIN.com.           IN      A

;; ANSWER SECTION:
mail.DOMAIN.com.    593     IN      A       64.124.160.95

;; Query time: 10 msec
;; SERVER: 4.2.2.2#53(4.2.2.2)
;; WHEN: Thu Aug 25 10:38:21 2011
;; MSG SIZE  rcvd: 53
Another wrinkle - someone pointed out to me that another server has Bind installed, so I configured the zone files as you said - using A records instead of CNAME and incrementing the serial number as I was told was necessary to pick up the changes, then restarted bind9. The two files are now identical:

Code:
root@Internal1:/etc/bind/zones/forward# cat db.DOMAIN.com
$TTL 28800
DOMAIN.com.      IN      SOA     ns1.DOMAIN.com. syslog.DOMAIN.com. (
                                                        2011082501
                                                        28800
                                                        3600
                                                        604800
                                                        38400 )

DOMAIN.com.      IN      NS              ns1.DOMAIN.com.
;
;web servers
@               IN      A       10.1.1.210
web1            IN      A       10.1.1.210
web10           IN      A       10.1.1.20
web12           IN      A       10.1.1.21
web20           IN      A       10.1.1.125
web21           IN      A       10.1.1.131
;
;internals
internal1       IN      A       10.1.1.121
internal2       IN      A       10.1.1.122
;
;Database servers
mapdb2          IN      A       10.1.1.190
;
;backup servers
mapbak1         IN      A       10.1.1.252
;
;mail servers
mail            IN      A       10.1.1.96
;
;other
dev11           IN      A       10.2.1.20
l3map02         IN      A       10.1.1.123
;
;CNAMES
ns1             CNAME   internal1
ldap            CNAME   internal1
#mail           CNAME   mapexch
backup          CNAME   mapbak1
www             CNAME   web1

DOMAIN.com. IN      MX      10      mail.DOMAIN.com.
I'm considering not using internal DNS at all... Also with some changes I've made I haven't received the SERVFAIL in a couple days.

Last edited by isthisyournacho; 08-25-2011 at 09:58 AM.
 
Old 08-25-2011, 10:58 AM   #12
isthisyournacho
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Issue turned out to be an alias definition on the Cisco PIX firewall - not a Linux issue at all. :\
 
  


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
Upgrade issues in ubuntu 10.10 lyroj Linux - Desktop 3 10-15-2010 10:59 AM
LXer: Ubuntu 9.04 on my 8.04 laptop: Intel video issues sink upgrade LXer Syndicated Linux News 0 07-01-2009 06:00 AM
Menu and Networking Issues after Upgrade to Ubuntu 6.06 LTS secondvijai007 Linux - Software 1 07-14-2006 08:47 PM
lame dns servers etc and general dns issues suse_linux9.1 Linux - Networking 3 06-01-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:43 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