Skip to content

Instantly share code, notes, and snippets.

@synio-wesley
Created April 9, 2019 08:41
Show Gist options
  • Save synio-wesley/ffd2ceb0f5abec10e9b865f6420ca804 to your computer and use it in GitHub Desktop.
Save synio-wesley/ffd2ceb0f5abec10e9b865f6420ca804 to your computer and use it in GitHub Desktop.
Example JSON config for DNS records
# Example JSON
{
"templates": {
"empty": {
"records": []
},
"example": {
"records": [
{
"type": "A",
"name": "@",
"value": "123.123.123.123",
"ttl": 3600
}, {
"type": "A",
"name": "www",
"value": "123.123.123.123",
"ttl": 3600
}, {
"type": "A",
"name": "*",
"value": "123.123.123.123",
"ttl": 3600
}, {
"type": "MX",
"name": "@",
"value": ["mail.@", 10],
"ttl": 3600
}, {
"type": "SPF",
"name": "@",
"value": "v=spf1 a mx ip4:123.123.123.123 ~all",
"ttl": 3600
}
]
}
},
"overwrites": {
"gmail": {
"remove": ["MX", "SPF"],
"add": [
{
"type": "MX",
"name": "@",
"value": ["ALT1.ASPMX.L.GOOGLE.COM", 5],
"ttl": 300
}, {
"type": "MX",
"name": "@",
"value": ["ALT2.ASPMX.L.GOOGLE.COM", 5],
"ttl": 300
}, {
"type": "MX",
"name": "@",
"value": ["ALT3.ASPMX.L.GOOGLE.COM", 10],
"ttl": 300
}, {
"type": "MX",
"name": "@",
"value": ["ALT4.ASPMX.L.GOOGLE.COM", 10],
"ttl": 300
}, {
"type": "MX",
"name": "@",
"value": ["ASPMX.L.GOOGLE.COM", 1],
"ttl": 300
}, {
"type": "SPF",
"name": "@",
"value": "v=spf1 a mx ip4:123.123.123.123 include:_spf.google.com ~all",
"ttl": 300
}
]
},
"office365": {
"remove": ["MX", "SPF"],
"add": [
{
"type": "CNAME",
"name": "autodiscover",
"value": "autodiscover.outlook.com",
"ttl": 300
}, {
"type": "CNAME",
"name": "lyncdiscover",
"value": "webdir.online.lync.com",
"ttl": 300
}, {
"type": "CNAME",
"name": "sip",
"value": "sipdir.online.lync.com",
"ttl": 300
}, {
"type": "CNAME",
"name": "enterpriseregistration",
"value": "enterpriseregistration.windows.net",
"ttl": 300
}, {
"type": "CNAME",
"name": "enterpriseenrollment",
"value": "enterpriseenrollment-s.manage.microsoft.com",
"ttl": 300
}, {
"type": "CNAME",
"name": "msoid",
"value": "clientconfig.microsoftonline-p.net",
"ttl": 300
}, {
"type": "SRV",
"name": "_sip._tls",
"value": ["1 443 sipdir.online.lync.com", 100],
"ttl": 300
}, {
"type": "SRV",
"name": "_sipfederationtls._tcp",
"value": ["1 5061 sipfed.online.lync.com", 100],
"ttl": 300
}, {
"type": "SPF",
"name": "@",
"value": "v=spf1 a mx ip4:123.123.123.123 include:spf.protection.outlook.com ~all",
"ttl": 300
}
]
}
},
"domains": {
"simple_example.com": {
"template": "example"
},
"example_with_gmail.com": {
"template": "example",
"overwrites": ["gmail"],
"add": [
{
"type": "TXT",
"name": "@",
"value": "google-site-verification=example",
"ttl": 3600
}
]
},
"example_with_office365.com": {
"template": "s1",
"overwrites": ["office365"],
"add": [
{
"type": "MX",
"name": "@",
"value": ["example.mail.protection.outlook.com", 1],
"ttl": 300
}
]
},
"advanced_example.com": {
"template": "example",
"overwrites": ["gmail"],
"add": [
{
"type": "TXT",
"name": "@",
"value": "google-site-verification=example",
"ttl": 3600
}, {
"type": "AAAA",
"name": "www",
"value": "2222:2222:2222:2222:2222:2222:2222:2222",
"ttl": 3600
}
]
}
},
"only": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment