LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 02-10-2006, 04:05 AM   #16
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698

Quote:
WARNING SOA expire value is less than refresh + 10 * retry (36000 < (10800 + 10 * 3600))
Change the values to both zone files to something like this:
Code:
                        28800           ; refresh, seconds
                        7200            ; retry, seconds
                        604800          ; expire, seconds
                        86400 )         ; minimum, seconds
For the rest I'm not sure since I use bind 9.3.2, you're using bind 8.4.6 and things have changed between the versions. Try the following:
Quote:
Zone "demorgan.com.br" (file demorgan.com.br.domain): no NS RRs found at zonetop
Replace:
Code:
@                IN       SOA demorgan.com.br.  fernando.demorgan.com.br. (
with
Code:
demorgan.com.br.                IN       SOA demorgan.com.br.  fernando.demorgan.com.br. (
Quote:
Zone "116.31.138.200.in-addr.arpa" (file 116.31.138.200.in-addr.arpa): no NS RRs found at zone top
Remove the line "$ORIGIN 0.31.138.200.in-addr.arpa." from the file 116.31.138.200.in-addr.arpa and change the SOA record as follows:
Code:
116.31.138.200.in-addr.arpa.      SOA     demorgan.com.br.  fernando.demorgan.com.br. (
Quote:
check_hints: A records for B.ROOT-SERVERS.NET class 1 do not match hint records
Your hint file (i.e. the one you define in /etc/named.conf for zone"." usually named named.ca or root.cache) is too old.
I suggest to read a HOWTO and experiment yourself. Also consider updating bind to a more recent verion.

Regards
 
Old 02-10-2006, 12:28 PM   #17
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Sorry, here is a snippet from a working name based virtual host Apache httpd.conf:
Code:
NameVirtualHost *:80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost *:80>
   ServerName www.somesite.com
   ServerAlias somesite.com *.somesite.com
   DocumentRoot /var/www/htdocs
</VirtualHost>

<VirtualHost *:80>
   ServerName mrtg.somesite.com
   ServerAlias mrtg.somesite.com
   DocumentRoot /var/www/mrtg
</VirtualHost>

<VirtualHost *:80>
   ServerName www.somesite.net
   ServerAlias somesite.net *.somesite.net
   DocumentRoot /var/www/htdocs_net
</VirtualHost>
On the DNS, try not to make it too complicated. I would also suggest at least glossing over the BIND documentation that explains what the settings mean so you don't end up changing things that either have no impact or break everything. If you just want a working zonefile, then use this (I purposely made this as small as possible, so it's easier to understand and to point out that you don't need a lot, like the redundant IN in every option, in a working zonefile) :
Code:
$TTL    1d
; Authoritative data for demorgan.com.br
@     SOA     @     fernando.demorgan.com.br. (
                 2006021002    ; Serial (must increase when you make changes!)
     8h     2h     1w     1d )
     NS        ns1
     MX 10     mail
mail     A     200.138.31.116

www  CNAME     mail
ns1  CNAME     mail
@    CNAME     mail
You asked about setting these:
Code:
www IN A 200.138.31.116
www IN CNAME demorgan.com.br.
So I'll try and clarify. In DNS you do not need, and should not have multiple records for a hostname (like www) so either use the host IP (A) record or the alias (CNAME) but not both. For actual host IP addresses, it's also good practice to have one A record for each IP and define the host in that (I defined the host A record for mail.demorgan.com.br above) and once you have a host's IP named, in your case mail.demorgan.com.br = 200.138.31.116, then you use CNAME aliases for any other name you want to resolve to this host as well.

With reverse DNS, there is something else to consider. You can set up your DNS server and tell it to act like the authoratative DNS for anything you want, but The Internet doesn't care unless you own that domain or IP block. So... setting up reverse DNS entries is great, but my guess is that someone else "owns" the IP block that you are on (an ISP of some sort, co-location company, etc?) and to get hosts on The Internet to do reverse DNS for the IP you are using you would have to have your ISP change their reverse DNS entry for the IP you are buying. So ask whoever hosts your IP address to please add a reverse DNS "PTR record to mail.demorgan.com.br." for your IP address so you can get mail.

Last edited by Darin; 02-10-2006 at 12:31 PM.
 
Old 02-10-2006, 01:02 PM   #18
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
Darin, your dns config didnīt worked. I think itīs because iīm using an old version of bind.

Guys, i need this thing working for monday, or i will get fired

with this config

Code:
$TTL    86400
; Authoritative data for demorgan.com.br
;
@                IN       SOA localhost. root.demorgan.com.br. (
                                2004102897      ; Serial (yymmddxx)
                                10800           ; Refresh 3 hours
                                3600            ; Retry   1 hour
                                36000           ; Expire  10 hours
                                86400 )         ; Minimum 24 hours
                 IN       NS            ns1.demorgan.com.br.
                 IN       NS            ns2.demorgan.com.br.
200.138.31.116  IN MX 10 demorgan.com.br.
www           IN       A             200.138.31.116
ns1           IN       A             200.138.31.116
ns2           IN       A             200.138.31.116
Why Virtual host does not work?

And why e-mails to this domain are sent to my second dns, and not to this one????

Last edited by stormrider_may; 02-10-2006 at 01:34 PM.
 
Old 02-11-2006, 07:04 AM   #19
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
ops, wrong config. Look at this one, just ignore the other...


Code:
$TTL    86400
; Authoritative data for demorgan.com.br
;
@                IN       SOA demorgan.com.br. root.demorgan.com.br. (
                                2006021101      ; Serial (yymmddxx)
                                10800           ; Refresh 3 hours
                                3600            ; Retry   1 hour
                                1209600           ; Expire  10 hours
                                86400 )         ; Minimum 24 hours
                 IN       NS            ns1.demorgan.com.br.
                 IN       NS            ns2.demorgan.com.br.
@ IN MX 5 mail
@ IN A 200.138.31.116
mail          IN       A             200.138.31.116
www           IN       A             200.138.31.116
ns1           IN       A             200.138.31.116
ns2           IN       A             200.138.31.116
I really donīt know why this does not work and even creating that config for reverse dns zone, my reverse dns keeps going to my isp dns server.
 
Old 02-11-2006, 10:11 AM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698
Here is a fresh zone file (change the serial number accordingly, rename you old zone file to .BAK , name this with your zone filename and stop/start bind):
Code:
$TTL    86400
; Authoritative data for demorgan.com.br
;
@                IN     SOA ns1.demorgan.com.br. root.demorgan.com.br. (
                        2006021102      ; Serial (yymmddxx)
                        28800           ; refresh, seconds
                        7200            ; retry, seconds
                        604800          ; expire, seconds
                        86400 )         ; minimum, seconds

                 NS            ns1.demorgan.com.br.
;                NS            ns2.demorgan.com.br.
                 MX 10         mail

ns1            IN       A             200.138.31.116
;ns2           IN       A             200.138.31.116
mail           IN       A             200.138.31.116
www            CNAME                  ns1
You must use different primary and secondary dns so I've commented the refferences to ns2.
For the reverse zone you must ask your ISP for the chunk that you're authoritative for, so the zone file you use for reverse delegation must contain the correct IPs. You can take a look here to see how it's done.
 
Old 02-11-2006, 08:17 PM   #21
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
bathory,

i have a second paid dns server. This one, if my master dns server goes down it redirects my e-mail to my isp e-mail (so i won't lost any e-mail). When i used your config, and checked dns with my dnsreport.com tool it told me i only have one mail server, which is the second one.
Look here http://www.dnsreport.com/tools/dnsre...emorgan.com.br

Why he does not accept my master dns server mail setting as being my domain mail server?

Thanks for your attention.
 
Old 02-12-2006, 04:41 AM   #22
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,294

Rep: Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698Reputation: 1698
To make dsnreport not complain:
Add as secondary dns the "second paid dns server". I searched registro.br and it says it's ns2.host4u.net. If that's true add:
Code:
               NS            ns2.host4u.net.
For the reverse lookup of your mail you must contact your ISP to see for what IP chuck you're authoritative for and create you in-addr.arpa zone accordingly.
According to this everything else seems OK. Perhaps it's just a matter of time for the parent dns server to be updated with your changes.
 
Old 02-14-2006, 06:44 AM   #23
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
Thanks bathory, everything seens to be working fine now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache Virtual Host problem - DNS or DHCP issue? costrevs Linux - Software 16 03-23-2005 08:50 AM
mail server: just send mails out, but not receive hamish Linux - Software 4 02-27-2005 12:06 PM
How to configure the virtual host based name? gz_xmg Linux - Networking 0 12-28-2004 02:12 AM
RedHat 9 Virtual Hosting -- Configure DNS?? mlhammer Linux - Networking 6 09-24-2003 09:10 PM
mail server fail to send out and receive, help!! littlelittle Linux - Networking 7 03-14-2002 11:26 AM

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

All times are GMT -5. The time now is 07:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration