Solved

Adding a record to DNS in ColdFusion

Posted on 2004-10-09
9
577 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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 500 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
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…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…

766 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