We help IT Professionals succeed at work.

DNS configurations in linux: right/wrong?

235 Views
Last Modified: 2013-12-06
hi all experts,

I have a linux server running behind a router (port 53 enabled, public IP 209.172.108.9) whose local ip is 192.168.1.2. I'd like to have this server to be a dns server to response internet requests to other web/mail servers on a different network.

1. i register 2 nameservers point toward that IP 209.172.108.9
2. my /etc/resolv.conf consisted of
nameserver 192.168.1.2
nameserver 209.81.59.3
nameserver 209.81.9.152 (these 2 are 2 dns resolvers from the ISP)

are those correct?

thanks so much
Comment
Watch Question

hi,

mostly correct, but one nameserver should be separate machine, just in case your server dies.

regards,

m

Author

Commented:
thanks! another part that i'm confusing is that...when i registered namservers, i have to set its IP to be 209.172.108.9 correct? if so, then why the /etc/resolv.conf set nameserver to be 192.168.1.2
because internally (from inside network) you can connect to server using this ip: 192.168.1.2 and it is no point of connecting to it via external (which sometimes even doesn't work, depending on the router).

Author

Commented:
thanks!
if so, then I only need to activate my named.conf and point other domains to the 2 nameservers  I set. they should work?
Do i have to assign any IPs or set up A records for 2 nameservers within my dns?

Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks again!
do u mind for another dumb question?
can one public IP have 2 namservers registered on it?
Gabriel OrozcoSolution Architect
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks somuch for your clear explanation. I was able to understand more about DNS functionality
below is my zone file for domain.com with name nameservers at dns1.mynameserver.net (209.172.108.9) and dns2.mynameserver.net (209.172.108.10)  
web/mail server is located at x.y.z.w

does it look allright? sofar it is working fine. just to make sure ;) .thanks.11

; Zone file for domain.com
$TTL 14400
@      86400    IN      SOA     dns1.mynameserver.net. email@yahoo.com. ( 2007071109      ; serial, todays date+todays
                86400           ; refresh, seconds
                7200            ; retry, seconds
                3600000         ; expire, seconds
                86400 )         ; minimum, seconds

domain.com. 86400 IN NS dns1.mynameserver.net.
domain.com. 86400 IN NS dns2.mynameserver.net.

domain.com.       IN A 209.172.108.9
domain.com.       IN MX 25 domain.com.

mail IN CNAME domain.com.
www IN CNAME domain.com.
ftp IN A x.y.z.w
hi,

yes it looks fine.

m
Gabriel OrozcoSolution Architect

Commented:
just a note:

you are to replace the part "serial, todays date+todays" with the actual value
also when you write
domain.com.       IN MX 25 domain.com.

the 25 is the PRIORITY of the email server. that is usually 10, 20 , 30 etc. so when the first priority email server is down, email can go to the secondary priority server. in your case you have only one email server and is USUAL to have it with priority 10 (although not needed, and your setup is fine). when I saw "25" I wanted to make clear is not the PORT where you expect email, but the priority.

other than that... your setup looks good

Author

Commented:
thanks !!!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.