Skip to content

Can customer use the API for updating PTR (reverse) name records for both IPv4 and IPv6 #634

Open

Description

@allmightyspiff
No description provided.

Activity

  1. moved this from 🆕 New to 🏗 In progress in Q4 2023on Dec 1, 2023
  2. allmightyspiff commented on Dec 1, 2023

    @allmightyspiff
    MemberAuthor
    1. Make sure there is a reverse PTR zone
    slcli --format=json call-api SoftLayer_Network_Subnet getReverseDomainRecords --id=<SUBMET ID>  --mask="mask[resourceRecords[data,id,host,domainId]]"
    
    [
      {
        "id": 1975225,
        "name": "2.d.0.0.1.0.e.1.0.d.0.f.7.0.6.2.ip6.arpa",
        "networkAddress": "2607:f0d0:1e01:00d2:0000:0000:0000:0000",
        "resourceRecords": [
          {
            "data": "2607.f0d0.1e01.00d2.0000.0000.0000.0000-ip6.static.sl-reverse.com.",
            "domainId": 1975225,  # DOMAIN ID
            "host": "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",
            "id": 150062376  # RECORD ID
          },
    ...
    
    1. IF there is no zone, create one.
    slcli call-api SoftLayer_Network_Subnet createReverseDomainRecords --id=<SUBNET ID>
    
    1. Edit each zone to update the data field. You will need the id and domainId properties for the next command
    slcli -v dns record-edit --by-id <RECORD ID> --data somefakehost.ibmtest.com <DOMAIN ID>
    

    OR with curl

    curl -u $SL_USER:$SL_APIKEY -X POST -H "Accept: */*" -H "Accept-Encoding: gzip, deflate, compress" -d '{"parameters": [{"data": "somefakehost.ibmtest.com", "domainId": <DOMAIN ID>,
    "expire": null, "host": "e.7.f.f.f.f.f.f.f.f.f.f.f.f.f.f", "id": <RECORD ID>, "minimum": null, "mxPriority": null, "refresh": null, "retry": null, "ttl": 86400, "type": "ptr"}]}'
    'https://api.softlayer.com/rest/v3.1/SoftLayer_Dns_Domain_ResourceRecord/<RECORD ID>/editObject.json'
    

    Same process for a IPv4 address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions