Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: jahlewis on November 05, 2008, 11:06:00 PM
-
What is the best way to customize the domain records listed in /var/services/tinydns/root/data?
I need my smeserver to direct internal users to an internal address for a domain that is managed externally. The external DNS info points to an external NAT address, so I need internal users to resolve the internal address for the entire domain, mx records etc.
Are there DB commands I can use to replace the stock dns records with custom ones? If not, what is the best way to gin up a template that will do this?
For example, I'd like /var/services/tinydns/root/data to change from this:
# NS Records
.avenue.org::hera.jmrl.org
# MX Records
@avenue.org::hera.jmrl.org
# A Records for domains
+avenue.org:166.61.234.91
# A Records for Hosts in avenue.org
=mail.avenue.org:10.0.8.5
+monticello.avenue.org:10.0.8.5
to this:
# NS Records
.avenue.org::monticello.avenue.org
# MX Records
@avenue.org::monticello.avenue.org
# A Records for domains
+avenue.org:10.0.8.5
# A Records for Hosts in avenue.org
=mail.avenue.org:10.0.8.5
+monticello.avenue.org:10.0.8.5
+aries.avenue.org:166.61.234.92
+*.aries.avenue.org:166.61.234.92
-
I tried the custom-template route with a test domain, but this appears not to work:
# create custom template with custom domain information
pico /etc/e-smith/templates-custom/var/service/tinydns/root/data/80avenue123TestRecords
# Avenue123RestRecords
# NS Records
.avenue123.org::hera.jmrl.org
# MX Records
@avenue123.org::monticello.avenue123.org
# A Records for domains
+avenue123.org:10.0.8.5
# A Records for Hosts in avenue.org
=mail.avenue123.org:10.0.8.5
+monticello.avenue123.org:10.0.8.5
+www.avenue123.org:10.0.8.5
# expand the templates to make the data file
expand-template /var/service/tinydns/root/data
# compile the data file
cd /var/service/tinydns/root
tinydns-data
# restart the dns service
/etc/init.d/tinydns restart
If I dig or try to ping the above A records on the local system, they are not recognized... Am I missing something here?
-
jahlewis
I need my smeserver to direct internal users to an internal address for a domain that is managed externally. The external DNS info points to an external NAT address, so I need internal users to resolve the internal address for the entire domain, mx records etc.
Not sure I fully understand you, but wouldn't you just configure that domain in the Domains panel to resolve locally (intead of resolving to Internet DNS servers). That way when local users type in the URL they will resolve locally and receive the local website etc. You would have that domain configured as a virtual domain pointing to an ibay on your server for local users.
External users will lookup external DNS records and be directed to the external site.
You can also selectively tell which host (ie www, mail, ftp etc) for which domain to resolve where in the Hostname and addresses panel. I think you need to reboot after changing these.
-
managing domains via the panel only lets you control A records. You can't control the domain's default IP, nor its MX record or NS records. This is what I need changed.
-
jahlewis
Hostname and addresses panel ?
-
OK, so the above changes appear to be in the system, so why can't I resolve them regularily?
If I do the lookup on the local server, it returns the correct information
[root@hera tinydns]# dig @localhost monticello.avenue123.org
; <<>> DiG 9.2.4 <<>> @localhost monticello.avenue123.org
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23941
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;monticello.avenue123.org. IN A
;; ANSWER SECTION:
monticello.avenue123.org. 86400 IN A 10.0.8.5
;; AUTHORITY SECTION:
avenue123.org. 259200 IN NS hera.jmrl.org.
;; ADDITIONAL SECTION:
hera.jmrl.org. 86400 IN A 166.61.234.91
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Nov 6 22:04:24 2008
;; MSG SIZE rcvd: 98
If try to ping the above address on the server itself, it does not resolve...
[root@hera tinydns]# ping monticello.avenue123.org
ping: unknown host monticello.avenue123.org
What am i missing?
-
This thread: http://forums.contribs.org/index.php/topic,36793.0.html
mentions this RPM :http://mirror.contribs.org/smeserver/releases/7/smedev/i386/RPMS/smeserver-tinydns-public-1.0.0-4.el4.sme.noarch.rpm
But I'm not finding it in any of the SME repositories, but it appears in http://fisheye1.cenqua.com/browse/smeserver/smeserver-tinydns-public as being somewhat maintained.
Any idea of where I can find the latest version to install and see if I can use this approach to customizing a particular domain's records?
-
jahlewis
That rpm is to make sme into a public DNS server, which is not recommended unless you are a very experienced admin and know what you are doing.
If you have to ask questions here, then you don't know what you are doing sufficiently well to be running a public DNS server.
-
Thanks Mary, but
1) your reply did not answer or help with any of my questions, so is it worth it to presume?
2) I currently run several public DNS servers (running BIND), so do understand DNS records etc.
3) I am trying to leverage smeserver to be a more customizable internal DNS server, but since adding my custom records to the tinydns/root/data for a specific domain does not work, I was hoping to find the tinydns.public rpm so I could figure out how it worked with custom data files.
Do you have enough experience to answer or help me here?
-
jahlewis
Have you actually tried making changes in the Hostnames and addresses panel for the actual domain(s) in question ?
-
Yes, but the hostnames panel does not allow me to change the default address for a domain, or the mx records. I say above how I added a custom template with the domain entries I want, rather than going through the domain and hostname panels. The script in the templates folder that generates the tinydns/root/data file generates the data from the domains/hostnames templates, and I'm not savvy enough with perl (or templating) to overwrite something already generated by the default script...
-
I'm seeing smeserver-tinydns-public in the sourceforge list (http://smeserver.cvs.sourceforge.net/viewvc/smeserver/smeserver-tinydns-public/), with a spec version of 1.6, but no built RPM's in any of the repositories. What would be involved to get this rpm built?
-
While folks are asking - put me down as someone who would appreciate a build of the current tinydns-public RPM. I've got an old build with a bunch of (now fixed) bugs that I have to patch every time it needs to be re-installed...
-
I'm seeing smeserver-tinydns-public in the sourceforge list (http://smeserver.cvs.sourceforge.net/viewvc/smeserver/smeserver-tinydns-public/), with a spec version of 1.6, but no built RPM's in any of the repositories. What would be involved to get this rpm built?
Launch a bug in the bugtracker, but I guess there is no maintainer (anymore).
-
Hi there,
I need MX record to be customized.
I've tried this:
1. edited /var/service/tinydns/root/data
2. cd /var/service/tinydns/root && tinydns-data
3. /etc/init.d/tinydns restart
After step 3, the MX settings got back to defaults in /var/service/tinydns/root/data.
How should I manage this?
-
Hi there,
I need MX record to be customized.
I've tried this:
1. edited /var/service/tinydns/root/data
2. cd /var/service/tinydns/root && tinydns-data
3. /etc/init.d/tinydns restart
After step 3, the MX settings got back to defaults in /var/service/tinydns/root/data.
How should I manage this?
This works:
1. edit /var/service/tinydns/root/data
2. comment in /var/service/tinydns/control/1 #/sbin/e-smith/expand-template /var/service/tinydns/root/data
3. cd /var/service/tinydns/root && tinydns-data
4. /etc/init.d/tinydns restart
5. /etc/init.d/dnscache restart
IF YOU COMMENT THAT OUT IN STEP 2, THE NETWORK AND HOST SETTINGS PROBABLY WON'T CHANGE ANY MORE VIA SERVER-MANAGER'S HOSTNAMES AND ADDRESSESS AND DOMAINS !!
check the results with dig:
tinydns:
$ dig MX domain @localhost
dnscache:
$ dig MX domain @IP
-
Hi there,
I need MX record to be customized.
Are you sure you really need this? What are you trying to achieve? Perhaps there is an easier option.
-
Are you sure you really need this? What are you trying to achieve? Perhaps there is an easier option.
So, there's domain.com, the NS1 is outside of LAN.
The SME server on LAN also serves this domain locally, because we don't want to configure a.domain.com and b.domain.com on NS1 because of security reasons (to reveal the local network structure) - these servers are in the LAN. "A" records can easily set up in server-manager, but not the "MX"es.
A second SME server has been set up to query the first one (Corporate DNS), and the client machines also (via 2nd server's DHCPd)
So, the 2nd SME server on the network wants to send a mail to log@domain.com, the first SME server mentioned above says the MX server is itself, and it's not good, we can't get the log messages of timed runs, etc..
So the solution was to change the namserver's MX settings for that domain.
But now we can not easily manage the 1st SME server's domain and hostname settings via server-manager thru web.
-
I would also be interested in gaining more control over the DNS server in SME. I am trying to get Sipxecs working on our network, and it has some specific DNS needs that SME does not seem to be able to pull off using the server-manager. Sipxecs wants DNS to resolve names like _sip._udp, _sip._tcp , and _sips._tcp, but when I try to put them in, the 'hostnames and addresses' server-manager panel says: "The hostname must contain only letters, numbers, and hyphens, and must start with a letter or number."