Koozali.org: home of the SME Server

custom DNS records

Offline bunkobugsy

  • *
  • 306
  • +4/-0
custom DNS records
« on: September 07, 2009, 02:38:43 PM »
I need a definitive guide to adding custom DNS (A) records for the entire LAN.

Did try adding and expanding a custom template for the hosts file, but it doesn't get forwarded to the lan side not even after dooing signal-event domain-modify (maybe it's not the right command).

But to able to add it as a remote hostname through the hostnames and addresses i'd have to add it to the domains list as a resolve localy domain, yet it's not our domain and the way we see the external domain would be messed up not mentioning that e-mails wouldn't get to the true MX for that domain.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: custom DNS records
« Reply #1 on: September 07, 2009, 04:20:43 PM »
bunkobugsy:

please explain your problem and your need, not your solution ;-)

Thank you
Stefano

Offline bunkobugsy

  • *
  • 306
  • +4/-0
Re: custom DNS records
« Reply #2 on: September 07, 2009, 11:50:27 PM »
You're right, I need to have this custom DNS entry available for the entire LAN:
a.b.c.d   IN   A    name.domain.com
and still cannot have domain.com added as a virtual domain.
Is there a way through db commands that I'm not aware of?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: custom DNS records
« Reply #3 on: September 08, 2009, 12:05:56 AM »
You're right, I need to have this custom DNS entry available for the entire LAN:
a.b.c.d   IN   A    name.domain.com

Why do you need that? What problem are you trying to solve?

Offline bunkobugsy

  • *
  • 306
  • +4/-0
Re: custom DNS records
« Reply #4 on: September 08, 2009, 12:27:23 AM »
Cause it's the wise thing to do adding it through one's router acting as a DNS cache rather than having it in every workstation's hosts file.

I repeat, I managed to add it in SME's hosts file with a custom template but it doesn't get known in the LAN, only on the server, maybe I'm not issuing the right commnand (apart from expand-template /etc/hosts).
And again it works ok if I add a virtual domain.com as resolve locally then through hostnames and addresses I make a remote reservation of a.b.c.d for name.domain.com, but it modifies the way we see all of domain.com (and possibly the e-mail flow to domain.com) and removing domain.com as a virtual domain also removes the remote reservation too.
Thanks for your time, I'm sure you have a solution for this.

Offline bunkobugsy

  • *
  • 306
  • +4/-0
Re: custom DNS records
« Reply #5 on: September 08, 2009, 12:38:42 AM »
and to actually answer the question:

a.b.c.d is a sharepoint portal that every station on the LAN side needs to access, but IIS won't redirect to proper virtual directory if I access it as a.b.c.d rather than name.domain.com (or so I am told and have verified it)

a.b.c.d/24 is avalable to us through a VPN connection, have added it as a local network in SME and routing is working correctly (the VPN router has a LAN ip that is the router for the new local network), SME is doing a great job

so basicly all I need now is that SME's DNS proxy does a name translation of a.b.c.d for name.domain.com

(and yes, all the stations are using only SME's ip for DNS)
« Last Edit: September 08, 2009, 12:45:24 AM by bunkobugsy »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: custom DNS records
« Reply #6 on: September 08, 2009, 12:53:21 AM »
a.b.c.d is a sharepoint portal that every station on the LAN side needs to access, but IIS won't redirect to proper virtual directory if I access it as a.b.c.d rather than name.domain.com (or so I am told and have verified it)
...
so basicly all I need now is that SME's DNS proxy does a name translation of a.b.c.d for name.domain.com

You say that domain.com is not your domain. It sounds to me that whoever controls that domain needs to fix it so that name.domain.com resolves correctly to a.b.c.d.

Offline bunkobugsy

  • *
  • 306
  • +4/-0
Re: custom DNS records
« Reply #7 on: September 08, 2009, 01:07:55 AM »
That was my first reaction too, but they won't since
www.domain.com and domain.com is their main site, but
name.domain.com is only available as a private network,
hence I need to add a custom DNS entry.

What if I readd the entry to the hosts db file that got removed by the sanity check when I removed domain.com from the virtual domains list, would it be removed again by a sanity check, isn't there a way to make it persistent through some db commands?

This actually sounds like a NFR, to be able to add entries in hostnames and addresses for domains that are not in the virtuals domains lists as resolve locally, or is it?

Or should I go the other way and add it to SME's hosts file,
would that make it visible for the entire LAN, or am I doing something wrong?
« Last Edit: September 08, 2009, 01:16:35 AM by bunkobugsy »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: custom DNS records
« Reply #8 on: September 08, 2009, 01:50:56 AM »
You can add name.domain.com as a domain. You'll then need to use a custom template to change the '.' A record for name.domain.com from the SME server's address to a.b.c.d.


Offline bunkobugsy

  • *
  • 306
  • +4/-0
Re: custom DNS records
« Reply #9 on: September 08, 2009, 02:14:07 AM »
Thanks Charlie, could you also point me in the right direction with this custom template?

Offline bunkobugsy

  • *
  • 306
  • +4/-0
Re: custom DNS records
« Reply #10 on: September 09, 2009, 03:30:01 PM »
I realy don't have a clue, could somebody point me in the right direction to create a custom template to change the '.' A record for name.domain.com from the SME server's address to a.b.c.d.

Also raised a bug: http://bugs.contribs.org/show_bug.cgi?id=5462