?
Solved

Adding a record to DNS in ColdFusion

Posted on 2004-10-09
9
Medium Priority
?
590 Views
Last Modified: 2013-12-24
I want to add a record to DNS server using ColdFusion.

Is there any idea ?
0
Comment
Question by:Michael_O
9 Comments
 

Author Comment

by:Michael_O
ID: 12266200
In general, I want to add subdomaind in a web site dynamically and using CF.
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 12266943
I do not think so that coldfusion can do this. You need to have access to the web server and coldfusion can not do this work for sure.
Though, this is very interesting question so I did googleing and other searches and could not found anything where it says coldfusion can do it. Though coldfusion is able to failover to different DNS but not adding the subdomain.
some good read I found and went through http://livedocs.macromedia.com/coldfusion/5.0/Installing_and_Configuring_ColdFusion_Server/CCappendix3.htm
that is old doc but good read for sure.
Also I will suggest that you wait a while if other expert knows some custom tag that can do this.
Regards,
---Pinal
0
 

Author Comment

by:Michael_O
ID: 12269851
Thank you Pinaldave,

It's completely interesting to do such job with a web client. but there's some restrcition with CF. Can someone suggest a way by using JAVA directly, instead of CF ?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 17

Expert Comment

by:Tacobell777
ID: 12272938
You need to look at the DNS software you have, if it allows you to add a record via the command line then you can use cfexecute...
0
 
LVL 1

Expert Comment

by:Wasistdas
ID: 12274327
I did it sometime ago under Linux.
0
 

Author Comment

by:Michael_O
ID: 12275382
I'm using Microsoft DNS. How can I do it ?
0
 
LVL 5

Accepted Solution

by:
elvistheprince earned 1500 total points
ID: 12285653
http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/sag_DNS_imp_AutomatingServerAdmin.asp

Talks about a dnscmd tool that you can use from the command line (using cfexecute) unfortunatly I don't have a W2K server CD nearby otherwise I'd check on syntax/if it works.
Hope this helps

Stephen
0
 

Author Comment

by:Michael_O
ID: 12295430
It seems to work and I'm working with it. Thank you for your response.

Is there any way to add a subdomain as well?

I'm programming an Application service provider based system. so I need to program some subdomains as they send a companyID to CF. I means that when a customer sign-up for this service, he can assign a subdomain in our web site and when he call this subdomain a specific companyID passed to CF to state that it's a specific customer.

related web sites include MindFlash.com.

Regards,
0
 
LVL 5

Expert Comment

by:elvistheprince
ID: 12345810
Syntax for using dnscmd to add a subdomain

C:\Documents and Settings\elvess\Desktop>dnscmd /zoneadd
USAGE:  DnsCmd <ServerName> /ZoneAdd <ZoneName> <ZoneType> [<Options>]
    <ZoneName>                  -- FQDN of zone
    <ZoneType>:
        /Primary /file <filename>
                -- standard file backed primary;  MUST include filename.
        /Secondary <MasterIPaddress> [<MasterIPaddress>] ..] [/file <filename>]
         -- standard secondary, MUST include at least one master IP;  filename i
s optional.
        /DsPrimary          -- DS integrated primary zone
    <Options>:
        [/file <filename>]  -- filename, invalid for DsPrimary
        [/load]             -- load existing file;  if not specified,
                               non-DS primary creates default zone records
        [/a <AdminName>]    -- zone admin email name; primary zones only
Command completed successfully.

E.G.
dnscmd father /ZoneAdd wibble.elvisnet.local /DsPrimary
Adds a (DIrectory Services intergarted) zone "wibble" to the the DNS server "Father"

Syntax to Add a host to a Subdomain:
C:\Documents and Settings\elvess\Desktop>dnscmd /recordadd
USAGE:  DnsCmd <ServerName> /RecordAdd <Zone> <NodeName> [/Aging] [<Ttl>] <RRTy
e> <RRData>

        <RRType>:       <RRData>:
          A              <IPAddress>

          NS,CNAME,MB,MD,PTR,MF,MG,MR   <HostName|DomainName>

          MX,RT,AFSDB    <Preference> <ServerName>

          SRV            <Priority> <Weight> <Port> <HostName>

          SOA            <PrimSvr> <Admin> <Serial#>\
                                <Refresh> <Retry> <Expire> <MinTTL>

          AAAA           <Ipv6Address>

          TXT,X25,HINFO,ISDN   <String> [<String>]

          MINFO,RP       <MailboxName> <ErrMailboxName>

          WKS            <Protocol> <IPAddress> <Service> [<Service>]..]

          WINS           <MapFlag> <LookupTimeout>\
                                <CacheTimeout> <IPAddress> [<IPAddress>]

          WINSR          <MapFlag> <LookupTimeout>\
                                <CacheTimeout> <RstDomainName>

        <Zone>        -- <ZoneName> | /RootHints
        <ZoneName>    -- FQDN of a zone
        <NodeName>    -- name of node to add record to
                         - FQDN of a node  (name with a '.' at the end) OR
                         - node name relative to the ZoneName           OR
                         - "@" for zone root node                       OR
                         - service name for SRV only (e.g. _ftp._tcp)
        <Ttl>         -- TTL for the RR  (Default: TTL defined in SOA)
        <HostName>    -- FQDN of a host
        <IPAddress>   -- e.g.  255.255.255.255
        <ipv6Address> -- e.g.  1:2:3:4:5:6:7:8
        <Protocol>    -- UDP | TCP
        <Service>     -- e.g.  domain, smtp
Command completed successfully.

E.G.
dnscmd father /RecordAdd wibble.elvisnet.local www A 10.0.0.94

Adds an A (host) record called "www" to the domain "wibble.elvisnet.local" on the DNS server "father" the host www.wibble.elvisnet.local has the IP address "10.0.0.94"
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question