Author Topic: Can the dns server for domain be changed?  (Read 2014 times)

corona

  • Zen Apprentice
  • *
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Can the dns server for domain be changed?
« on: October 07, 2008, 03:26:58 am »
Ebox seems to automatically sets the dns server for any domain to ns.<domain>.com. , and it's assigned to 127.0.0.1 which isn't suitable (afaik) if the server is being used as the master server for the domain on the internet (took me ages to dubug the randomness of some people accessing our site/email and others not).

Also, if you have a secondary nameserver (as everyone should) there doesn't seem to be any way to add this to the zone file other than by hand (watch out for it getting wiped by updates to ebox interface).

I haven't found any way to change this from the interface, is there something hidden away? I've manually updated the ip in the /etc/bind/db.<domain> to my external internet ip and all seems to be fine. ( made the change in the template as well ).

Any chance of adding this as a modifiable name/address to a feature wish list? Basically just have domain nameservers set to the original settings by default, but have boxes to use custom name server address/ip's.
Or give me a pointer on how to add it as a feature myself? (I'm more than happy to submit a patch if I get it done).

Cheers,
Andrew

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Can the dns server for domain be changed?
« Reply #1 on: October 07, 2008, 12:32:37 pm »
Hi Andrew,

Quote
Ebox seems to automatically sets the dns server for any domain to ns.<domain>.com. , and it's assigned to 127.0.0.1 which isn't suitable (afaik) if the server is being used as the master server for the domain on the internet (took me ages to dubug the randomness of some people accessing our site/email and others not).

One quick question: does adding a host name  called ns with a external or whatever IP work?


corona

  • Zen Apprentice
  • *
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Can the dns server for domain be changed?
« Reply #2 on: October 08, 2008, 12:22:16 am »
Ah no, it wont let me "IP Address <snip> already exists". I've already got my host called mail set to that ip (I saw somewhere some time ago that mail servers are supposed to be A records, not CNAMES, so I had to make it my main host name not an alias), with all the other services set as alias's (ie www, webmail, and so on).

Once you've got one host name set to an IP it will not allow you to give another hostname the same IP. Although on the old server, not running ebox, I had 5 hostnames as A records to the same ip in bind, it didn't seem to mind, it just meant when you ping'd the ip it resolved to a random hostname out of the list of ones assigned to it.

Andrew

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Can the dns server for domain be changed?
« Reply #3 on: October 08, 2008, 12:51:51 am »
I think you are right. I didn't code the dns module. I'll check the RFCs and bind documentation tomorrow to see what seems to be right. Just off the top of my head removing the code to check if there's already an A register with that IP is pretty straightforward. And, as you said, the only thing to work out is the reverse resolution.

Cheers,

Javi


sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: Can the dns server for domain be changed?
« Reply #4 on: October 30, 2008, 04:23:55 pm »
Hi corona,

You're right about A records. Javi and me was talking about the solution to apply here.

A new table must be added per domain, indicating those reverse resolutions you want to use when more than one A record points to the same IP address. Along with relaxing the uniqueness constraint for IP addresses, this should fix this issue.

We try to solve this in short future...

I have just opened ticket #1142 to solve this.
« Last Edit: October 30, 2008, 04:26:44 pm by sixstone »
My secret is my silence...

corona

  • Zen Apprentice
  • *
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Can the dns server for domain be changed?
« Reply #5 on: October 30, 2008, 09:53:38 pm »
Yeah, I like the sound of that. My dns server has been happy with manual changes to date, I haven't had to add any records to it so it's sitting as is. I don't really care about the reverse lookups, although I guess other servers on the internet might. As far as I know though, if a reverse is done on our external ip the reverse lookup is supplied by our isp, it doesn't get to our server.

The only other thing I think the dns module needs is a box to add in secondary nameservers, I get our secondary nameserver provided for free by twisted4life.com, and have to manually add it into the dns record (   NS ns1.twisted4life.com.   ;nameserver ) under the ebox added one.
Should that be added to a separate ticket, I guess it probably should?

Regards,
Andrew

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: Can the dns server for domain be changed?
« Reply #6 on: October 31, 2008, 09:42:13 am »
You're right.

DNS module may be enhanced in the future. Adding NS records could be another thing to do :D
My secret is my silence...