[Solved] Troubles setting up DNS

4 posts / 0 new
Last post
#1 Fri, 09/21/2018 - 05:08
NadimD
NadimD's picture

[Solved] Troubles setting up DNS

Hello everyone,

Thank you first of all for these wonderful tools, I've been recently seduced by your work and your community. I come to you to ask you for a little help about DNS. Please read the following context in order to understand.

I've got a fresh server with a fresh installation of Centos 7 + VirtualMin Lastet. Everything went well during installation and configuration, I've been able to configure Nginx and my Virtual Server and BIND9.

What my domain name offers me :

  1. Two DNS set from my host ( dns112.ovh.net + ns112.ovh.net )

What my dedicated server offers me :

  1. One IP address
  2. One http/hostname address (ns-xxxx.ip-xxx-xxx-xxx.eu) <= Should I use this address as the primary DNS ? Below, I decided to create a custom dns : ns1.domain.com

What I did on my domain :

  1. Deleted first DNS dns112.ovh.ne" and replaced it by ns1.mydomain.com and not ns-xxxx.ip-xxx-xxx-xxx.eu
  2. Kept second DNS ns112.ovh.net

What I did on BIND9 :

Addresses :

ns1.domain.com. Default xxx.xxx.xxx.xx
domain.com. Default xxx.xxx.xxx.xx
www.domain.com. 60 xxx.xxx.xxx.xx
pong.domain.com. 60 xxx.xxx.xxx.xx
ftp.domain.com. Default xxx.xxx.xxx.xx
m.domain.com. Default xxx.xxx.xxx.xx
localhost.domain.com. Default 127.0.0.1
mail.domain.com.

Name Servers :
domain.com. Default ns112.ovh.net.
domain.com. Default ns1.domain.com.

What it looks like in Virtualmin > Server Configuration > DNS Records :

Record name Type Value
domain.com SOA - Start Of Domain ns-xxxx.ip-xxx-xxx-xxx.eu. root.ns-xxxx.ip-xxx-xxx-xxx.eu. 1537365235 6 ...
domain.com NS - Name Server ns112.ovh.net.
ns1         A - IPv4 Address xxx.xxx.xxx.xx
domain.com  A - IPv4 Address xxx.xxx.xxx.xx
www         A - IPv4 Address xxx.xxx.xxx.xx
pong       A - IPv4 Address xxx.xxx.xxx.xx
ftp         A - IPv4 Address xxx.xxx.xxx.xx
m           A - IPv4 Address xxx.xxx.xxx.xx
localhost   A - IPv4 Address 127.0.0.1
mail       A - IPv4 Address xxx.xxx.xxx.xx
domain.com MX - Mail Server 5 mail.domain.com.
domain.com SPF - Sender Permitted From v=spf1 a mx a:domain.com ip4:xxx.xxx.xxx.xx ip4:xxx.xxx.xxx.xx ip6:2001: ...
domain.com NS - Name Server ns1.domain.com.

Previously, I didn't set up ns1.domain.com, I used instead the ns-xxxx.ip-xxx-xxx-xxx.eu as my domain's first DNS.

It worked and I could send/receive emails, access pong.domain.com, etc.

Now that I operated as bellow, nothing works except domain.com.

I really missed something to understand fully how it works, but even after reading a lot on the net and seeing examples, I still can't understand ... What did I do wrong ? Why people configure BIND9 AND virtual server DNS RECORDS ?

Should I order a second IP address for the server and use two DNS ?

If you could point me in the right direction, that would be great, I would love to learn and not only correct the glitches.

Thank you very much. :)

PS: I hope there is no offend by the fact that I posted a help request and didn't post somewhere else yet. I'll find a way to contribute on my own to this great community. I'm a web developer, so feel free to ask me for help if needed. I would like to learn how to manage a server and this starts by using Virtualmin and explore !

Edit : Ok, I found this : https://www.virtualmin.com/documentation/dns/faq . I haven't seen the full page so I'm gonna try and be back to you ! :)

Fri, 09/21/2018 - 11:50
andreychek

Howdy,

If you don't find what you're after in the FAQ, is there any chance you could share your actual domain that you're experiencing problems with? That would make troubleshooting quite a bit easier, as we could do remote DNS tests on what you have setup there.

-Eric

Sat, 09/22/2018 - 17:47
noisemarine

TL;DR You need to go to the registrar of domain.com and create a HOST record for ns1.domain.com and it's IP address. Then you need to delegate domain.com to ns1.domain.com and ns112.ovh.net.

Longer: You have a DNS server that is referring to itself. For example, if I want to know the IP address of ns1.domain.com so that I can ask it about mail.domain.com, I have to ask the DNS server at ns1.domain.com. Can you see how this won't work? This is fine and normal, but you have to perform an extra step. You have to tell the .com nameservers where your server is. That is the HOST record. Your registrar will have an interface for creating it.

Thu, 10/04/2018 - 10:03
NadimD
NadimD's picture

Thank you for your answers and sorry for the delay, I was out of work for a few days.

Based on your explanations and by searching more, I found the solution and it sure is the way you explain ! I've installed VirtualMin on another server and it worked without any conflict.

What I did is I delegated domain.com to ns1.domain.com and ns112.ovh.net, then I configured bind for domain.com and other domains and everything went well ! It took a few days for the ns servers to get refreshed.

Thank you again.

Best Regards

Topic locked