Solved

Adding a record to DNS in ColdFusion

Posted on 2004-10-09
9
567 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
Comment Utility
In general, I want to add subdomaind in a web site dynamically and using CF.
0
 
LVL 21

Expert Comment

by:pinaldave
Comment Utility
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
Comment Utility
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
 
LVL 17

Expert Comment

by:Tacobell777
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Expert Comment

by:Wasistdas
Comment Utility
I did it sometime ago under Linux.
0
 

Author Comment

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

Accepted Solution

by:
elvistheprince earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to Eclipse 16 98
PHP Register global 21 63
Add server behaviors to Dreamweaver CC 2015 2 82
JVM encoding. How to change encoding. 27 62
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now