Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
allmightyspiff opened this issue Dec 1, 2023 · 1 comment
Assignees

Comments

@allmightyspiff
Copy link
Member

No description provided.

@allmightyspiff allmightyspiff self-assigned this Dec 1, 2023
@allmightyspiff
Copy link
Member Author

  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
Labels
None yet
Projects
No open projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant