bind/dns "A" record to external server

Discussion in 'Server Operation' started by ryoken, Jul 8, 2006.

  1. ryoken

    ryoken New Member

    i was wondering how you would configure (if it is at all possible) bind dns server to point its "A" record to an external mail and web server.

    for example, the local network domain name is, but the registered external domain name is also now the dns server can easily resolve internal hostnames on the local network, but if the mail and web servers are being hosted on external servers outside the local network, how would you point the "A" record in the forward zone file to the mail/web servers?

    to further complicate things, the mail and web servers have dynamic ip addresses. so this means putting a 'static' ip address of the mail and web server for the "A" record may work today, but not tomorrow.

    any suggestions? :confused:
  2. falko

    falko Super Moderator ISPConfig Developer

  3. ryoken

    ryoken New Member

    Hi falko, thanx for your reply! yes, ive looked at the howto and other places through google. specifically, i was wondering what happens if "" is a dynamic ip address. coz then the "A" record in the zone file would become invalid, say tomorrow.

    For example:

    mail IN A ; We have our mail server somewhere else.

    But say tomorrow, the IP address of the mail server changes to Then would this mean we would always need to change the zone file whenever the mail server IP address changes? :confused:
  4. falko

    falko Super Moderator ISPConfig Developer

    That's right. But you could write a script that checks your public IP address and changes the zone file, if necessary. You can run this script by cron, e.g. every 5 minutes or so.
  5. ryoken

    ryoken New Member

    ahh... thats a great idea! :D

    maybe something like doing a grep (or sed?) on the dig/host/nslookup output to find out the ip address of the mail server being hosted by a 3rd party provider. then comparing that result with what is in my zone file... and if there are no differences, then leave untouched, else replace with new ip address :cool:

    once a zone file is changed, will bind need to be restarted? or will it automagically notice the change and read the new ip address?
  6. falko

    falko Super Moderator ISPConfig Developer

    Restart it. :)
  7. ryoken

    ryoken New Member

    cheers! :cool:

Share This Page