Revamp the website front page (#213)

* First iteration. Just the front page.
This commit is contained in:
Tom Limoncelli 2017-09-29 15:44:13 -04:00 committed by GitHub
parent 823e8bb1a3
commit d08d57d403
19 changed files with 474 additions and 9 deletions

View file

@ -56,12 +56,16 @@ func generateFeatureMatrix() error {
}
fm.SetSimple(name, true, func() bool { return providers.ProviderHasCabability(p, cap) })
}
setDoc := func(name string, cap providers.Capability) {
setDoc := func(name string, cap providers.Capability, defaultNo bool) {
if notes[cap] != nil {
fm[name] = notes[cap]
} else if defaultNo {
fm[name] = &providers.DocumentationNote{
HasFeature: false,
}
}
}
setDoc("Official Support", providers.DocOfficiallySupported)
setDoc("Official Support", providers.DocOfficiallySupported, true)
fm.SetSimple("Registrar", false, func() bool { return providers.RegistrarTypes[p] != nil })
fm.SetSimple("DNS Provider", false, func() bool { return providers.DNSProviderTypes[p] != nil })
setCap("ALIAS", providers.CanUseAlias)
@ -69,8 +73,8 @@ func generateFeatureMatrix() error {
setCap("PTR", providers.CanUsePTR)
setCap("CAA", providers.CanUseCAA)
setCap("TLSA", providers.CanUseTLSA)
setDoc("dual host", providers.DocDualHost)
setDoc("create-domains", providers.DocCreateDomains)
setDoc("dual host", providers.DocDualHost, false)
setDoc("create-domains", providers.DocCreateDomains, true)
// no purge is a freaky double negative
cap := providers.CantUseNOPURGE

View file

@ -56,7 +56,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
</tr>
<tr>
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="The provider has registrar capabilities to set nameservers for zones">Registrar</th>
@ -327,7 +329,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
</tr>
<tr>
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="indicates you can use NO_PURGE macro to prevent deleting records not managed by dnscontrol. A few providers that generate the entire zone from scratch have a problem implementing this.">no_purge</th>

View file

@ -37,3 +37,5 @@ Dnscontrol is a platform for seamlessly managing your dns configuration across a
### [Adding new DNS record types]({{site.github.url}}/adding-new-rtypes)
(Preview the new [frontpage]({{site.github.url}}/new-index.md)

View file

@ -1,3 +1,7 @@
---
layout: default
---
# Migrating zones to DNSControl
This document explains how to migrate (convert) DNS zones from

159
docs/new-index.md Normal file
View file

@ -0,0 +1,159 @@
---
layout: default
---
<div class="row jumbotron">
<div class="col-md-12">
<div>
<h1 class="hometitle">DnsControl</h1>
<p class="lead">DnsControl is a platform for seamlessly managing your DNS configuration across any number of DNS hosts, both in the cloud or in your own infrastructure. It manages all of the domains for the Stack Overflow network, and can do the same for you!</p>
</div>
</div>
</div>
<div class="row text-center" style="padding-top: 75px;">
<div class="col-md-4">
<h3>Try It</h3>
<p>Want to jump right in? Follow our
<strong><a href="getting-started">quick start tutorial</a></strong>
on a new domain or
<strong><a href="migrating">migrate</a></strong>
an existing one. Read the
<strong><a href="js">language spec</a></strong>
for more info.
</p>
</div>
<div class="col-md-4">
<h3>Use It</h3>
<p>Take advantage of the
<strong><a href="">advanced features</a></strong>.
Use macros and variables for easier updates.
<!-- Optimize your SPF records. -->
Upload your zones to
<strong><a href="provider-list">multiple DNS providers</a></strong>.
</p>
</div>
<div class="col-md-4">
<h3>Get Involved</h3>
<p>Join our
<strong><a href="https://groups.google.com/forum/#!forum/dnscontrol-discuss">mailing list</a></strong>.
We make it easy to contribute by using
<strong><a href="https://github.com/StackExchange/dnscontrol">GitHub</a></strong>,
you can make code changes with confidence thanks to extensive integration tests.
The project is
<strong><a href="https://everythingsysadmin.com/2017/08/go-get-up-to-speed.html">newbie-friendly</a></strong>
so jump right in!
</p>
</div>
</div>
<div class="row" style="padding-top: 75px"><div class='col-md-4 col-md-offset-4'><h2 class="text-center feature-header">Features</h2></div></div>
<hr class="feature">
<div class="row">
<div class="col-md-6 left">
<div class="col-md-2 left ">
<img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;">
</div>
<div class="col-md-10">
<p class="smaller">Maintain your DNS data as a high-level DS, with macros, and variables for easier updates.</p>
</div>
</div>
<div class="col-md-6 right">
<div class="col-md-2 left"><img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;"></div>
<div class="col-md-10">
<p class="smaller">Super extensible! Plug-in architecture makes adding new DNS providers and Registrars easy!</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 left">
<div class="col-md-2 left ">
<img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;">
</div>
<div class="col-md-10">
<p class="smaller">Eliminate vendor lock-in. Switch between DNS providers easily.</p>
</div>
</div>
<div class="col-md-6 right">
<div class="col-md-2 left"><img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;"></div>
<div class="col-md-10">
<p class="smaller">Reduce points of failure: Easily maintain dual DNS providers.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 left">
<div class="col-md-2 left ">
<img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;">
</div>
<div class="col-md-10">
<p class="smaller">Supports 10+ DNS Providers including BIND, AWS Route 53, Google DNS, and name.com</p>
</div>
</div>
<div class="col-md-6 right">
<div class="col-md-2 left"><img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;"></div>
<div class="col-md-10">
<p class="smaller">Apply CI/CD principles to DNS: Unit-tests, system-tests, automated deployment.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 left">
<div class="col-md-2 left ">
<img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;">
</div>
<div class="col-md-10">
<p class="smaller">All the benefits of Git (or any VCS) for your DNS zone data.</p>
</div>
</div>
<div class="col-md-6 right">
<div class="col-md-2 left"><img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;"></div>
<div class="col-md-10">
<p class="smaller">Optimize DNS with SPF optimizer (coming soon!)</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 left">
<div class="col-md-2 left ">
<img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;">
</div>
<div class="col-md-10">
<p class="smaller">Runs on Linux, Windows, Mac, or any operating system supported by Go.</p>
</div>
</div>
<div class="col-md-6 right">
<div class="col-md-2 left"><img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;"></div>
<div class="col-md-10">
<p class="smaller">Enable/disable Cloudflare proxying (the "orange cloud" button) directly from your DNSControl files.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 left">
<div class="col-md-2 left ">
<img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;">
</div>
<div class="col-md-10">
<p class="smaller">Assign an IP address to a constant and use the variable name throughout the configuration. Need to change the IP address globally? Just change the variable and "recompile."</p>
</div>
</div>
<div class="col-md-6 right">
<div class="col-md-2 left"><img class="fpicon" src="public/cog.svg" style="max-height: 40px; max-width: 40px;"></div>
<div class="col-md-10">
<p class="smaller">Keep similar domains in sync with transforms, macros, and variables.</p>
</div>
</div>
</div>
<div class="row" style="padding-top: 75px"><div class='col-md-4 col-md-offset-4'><h2 class="text-center feature-header"><a href="toc">Read More</a></h2></div></div>
<hr class="feature">

View file

@ -6,7 +6,7 @@ layout: default
<table class='table table-bordered'>
<thead>
<th>Name</th>
<th>Javascript Identifier</th>
<th>Identifier</th>
</thead>
{% for p in site.providers %}
<tr>
@ -80,4 +80,4 @@ code to support this provider, please re-open the issue. We'd be glad to help in
<li>Hurricane Electric (dns.he.net) (<a href="https://github.com/StackExchange/dnscontrol/issues/118">#118</a>)</li>
<li>Linode (<a href="https://github.com/StackExchange/dnscontrol/issues/121">#121</a>)</li>
<li>OVH (<a href="https://github.com/StackExchange/dnscontrol/issues/143">#143</a>)</li>
</ul>
</ul>

15
docs/public/app-store.svg Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="App_Store" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5640259,13.8623047
c-0.4133301,0.9155273-0.6115723,1.3251343-1.1437988,2.1346436c-0.7424927,1.1303711-1.7894897,2.5380249-3.086853,2.5500488
c-1.1524048,0.0109253-1.4483032-0.749939-3.0129395-0.741333c-1.5640259,0.008606-1.8909302,0.755127-3.0438843,0.7442017
c-1.296814-0.0120239-2.2891235-1.2833252-3.0321655-2.4136963c-2.0770874-3.1607666-2.2941895-6.8709106-1.0131836-8.8428955
c0.9106445-1.4013062,2.3466187-2.2217407,3.6970215-2.2217407c1.375,0,2.239502,0.7539673,3.3761597,0.7539673
c1.1028442,0,1.7749023-0.755127,3.3641357-0.755127c1.201416,0,2.4744263,0.6542969,3.3816528,1.7846069
C14.0778809,8.4837646,14.5608521,12.7279663,17.5640259,13.8623047z M12.4625244,3.8076782
c0.5775146-0.741333,1.0163574-1.7880859,0.8571167-2.857666c-0.9436035,0.0653076-2.0470581,0.6651611-2.6912842,1.4477539
C10.0437012,3.107605,9.56073,4.1605835,9.7486572,5.1849365C10.7787476,5.2164917,11.8443604,4.6011963,12.4625244,3.8076782z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

16
docs/public/cog.svg Normal file
View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Cog" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M16.783,10c0-1.049,0.646-1.875,1.617-2.443c-0.176-0.584-0.407-1.145-0.692-1.672c-1.089,0.285-1.97-0.141-2.711-0.883
c-0.741-0.74-0.968-1.621-0.683-2.711c-0.527-0.285-1.088-0.518-1.672-0.691C12.074,2.57,11.047,3.215,10,3.215
c-1.048,0-2.074-0.645-2.643-1.615C6.772,1.773,6.213,2.006,5.686,2.291c0.285,1.09,0.059,1.971-0.684,2.711
C4.262,5.744,3.381,6.17,2.291,5.885C2.006,6.412,1.774,6.973,1.6,7.557C2.57,8.125,3.215,8.951,3.215,10
c0,1.047-0.645,2.074-1.615,2.643c0.175,0.584,0.406,1.144,0.691,1.672c1.09-0.285,1.971-0.059,2.711,0.682
c0.741,0.742,0.969,1.623,0.684,2.711c0.527,0.285,1.087,0.518,1.672,0.693c0.568-0.973,1.595-1.617,2.643-1.617
c1.047,0,2.074,0.645,2.643,1.617c0.584-0.176,1.144-0.408,1.672-0.693c-0.285-1.088-0.059-1.969,0.683-2.711
c0.741-0.74,1.622-1.166,2.711-0.883c0.285-0.527,0.517-1.086,0.692-1.672C17.429,11.873,16.783,11.047,16.783,10z M10,13.652
c-2.018,0-3.653-1.635-3.653-3.652c0-2.018,1.636-3.654,3.653-3.654c2.018,0,3.652,1.637,3.652,3.654
C13.652,12.018,12.018,13.652,10,13.652z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
docs/public/createToken.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

11
docs/public/database.svg Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Database" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M16.726,12.641c-0.843,1.363-3.535,2.361-6.726,2.361c-3.191,0-5.883-0.998-6.727-2.361C3.095,12.351,3,12.506,3,12.648
c0,0.144,0,2.002,0,2.002C3,16.59,6.134,18.6,10,18.6s7-2.01,7-3.949c0,0,0-1.858,0-2.002C17,12.506,16.904,12.351,16.726,12.641z
M16.737,7.525c-0.83,1.205-3.532,2.09-6.737,2.09c-3.205,0-5.908-0.885-6.738-2.09C3.091,7.277,3,7.412,3,7.523
c0,0.113,0,2.357,0,2.357c0,1.762,3.134,3.189,7,3.189s7-1.428,7-3.189c0,0,0-2.244,0-2.357C17,7.412,16.908,7.277,16.737,7.525z
M10,1C6.134,1,3,2.18,3,3.633v1.26c0,1.541,3.134,2.791,7,2.791s7-1.25,7-2.791v-1.26C17,2.18,13.866,1,10,1z"/>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

10
docs/public/grid.svg Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Grid" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8,4H5C4.447,4,4,4.447,4,5v3c0,0.552,0.447,1,1,1h3c0.553,0,1-0.448,1-1V5
C9,4.448,8.553,4,8,4z M15,4h-3c-0.553,0-1,0.447-1,1v3c0,0.552,0.447,1,1,1h3c0.553,0,1-0.448,1-1V5C16,4.448,15.553,4,15,4z M8,11
H5c-0.553,0-1,0.447-1,1v3c0,0.552,0.447,1,1,1h3c0.553,0,1-0.448,1-1v-3C9,11.448,8.553,11,8,11z M15,11h-3c-0.553,0-1,0.447-1,1v3
c0,0.552,0.447,1,1,1h3c0.553,0,1-0.448,1-1v-3C16,11.448,15.553,11,15,11z"/>
</svg>

After

Width:  |  Height:  |  Size: 908 B

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Hour_glass" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M15.6,4.576c0-2.139,0-2.348,0-2.348C15.6,1.439,13.092,0,10,0C6.907,0,4.4,1.439,4.4,2.228c0,0,0,0.209,0,2.348
C4.4,6.717,8.277,8.484,8.277,10c0,1.514-3.877,3.281-3.877,5.422c0,2.141,0,2.35,0,2.35C4.4,18.56,6.907,20,10,20
c3.092,0,5.6-1.44,5.6-2.229c0,0,0-0.209,0-2.35c0-2.141-3.877-3.908-3.877-5.422C11.723,8.484,15.6,6.717,15.6,4.576z M5.941,2.328
c0.696-0.439,2-1.082,4.114-1.082c2.113,0,4.006,1.082,4.006,1.082c0.142,0.086,0.698,0.383,0.317,0.609
C13.54,3.434,11.9,3.957,10,3.957c-1.9,0-3.484-0.576-4.324-1.074C5.295,2.658,5.941,2.328,5.941,2.328z M10.501,10
c0,1.193,0.996,1.961,2.051,2.986c0.771,0.748,1.826,1.773,1.826,2.435v1.328c-0.97-0.483-3.872-0.955-3.872-2.504
c0-0.783-1.013-0.783-1.013,0c0,1.549-2.902,2.021-3.872,2.504v-1.328c0-0.662,1.056-1.688,1.826-2.435
C8.502,11.961,9.498,11.193,9.498,10c0-1.193-0.996-1.961-2.051-2.986c-0.771-0.75-1.826-1.775-1.826-2.438L5.575,3.578
C6.601,4.131,8.227,4.656,10,4.656c1.772,0,3.406-0.525,4.433-1.078l-0.055,0.998c0,0.662-1.056,1.688-1.826,2.438
C11.498,8.039,10.501,8.807,10.501,10z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

11
docs/public/inbox.svg Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Inbox" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<path d="M19.253,9.542c-0.388-0.416-2.265-2.271-3.122-3.118C15.868,6.165,15.492,6,15.098,6H4.902c-0.394,0-0.77,0.165-1.033,0.424
C3.011,7.271,1.135,9.125,0.747,9.542c-0.485,0.521-0.723,0.902-0.624,1.449s0.466,2.654,0.556,3.074
C0.767,14.484,1.363,15,1.919,15h16.162c0.556,0,1.152-0.516,1.241-0.935c0.089-0.42,0.457-2.527,0.556-3.074
S19.739,10.062,19.253,9.542z M14.014,10.003c-0.101,0-0.193,0.052-0.238,0.133L12.966,12H7.034l-0.809-1.864
c-0.045-0.081-0.137-0.133-0.238-0.133H2.473L4.495,8h11.01l2.023,2.003H14.014z"/>
</svg>

After

Width:  |  Height:  |  Size: 989 B

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Sound_mute" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M14.201,9.194c1.389,1.883,1.818,3.517,1.559,3.777c-0.26,0.258-1.893-0.17-3.778-1.559l-5.526,5.527
c4.186,1.838,9.627-2.018,10.605-2.996c0.925-0.922,0.097-3.309-1.856-5.754L14.201,9.194z M8.667,7.941
c-1.099-1.658-1.431-3.023-1.194-3.26c0.233-0.234,1.6,0.096,3.257,1.197l1.023-1.025C9.489,3.179,7.358,2.519,6.496,3.384
C5.568,4.31,2.048,9.261,3.265,13.341L8.667,7.941z M18.521,1.478c-0.39-0.391-1.023-0.391-1.414,0L1.478,17.108
c-0.391,0.391-0.391,1.024,0,1.414c0.391,0.391,1.023,0.391,1.414,0L18.521,2.892C18.912,2.501,18.912,1.868,18.521,1.478z"/>
</svg>

After

Width:  |  Height:  |  Size: 1,020 B

BIN
docs/public/timeline.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Windows_Store" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<path d="M9.5,3.2410278V9.5H18V2L9.5,3.2410278z M2,9.5h6.5V3.3870239L2,4.3359985V9.5z M9.5,16.7589722L18,18v-7.5H9.5V16.7589722z
M2,15.6640015l6.5,0.9489746V10.5H2V15.6640015z"/>
</svg>

After

Width:  |  Height:  |  Size: 639 B

152
docs/spf.md Normal file
View file

@ -0,0 +1,152 @@
---
layout: default
---
# The DNS Control SPF Optimizer
SPF records are hints to email systems that help them determine if
an incoming email message might be spam. The SPF records are placed
in DNS TXT records like so:
$ dig +short google.com txt
"v=spf1 include:_spf.google.com ~all"
SPF records are intentionally limited to 10 verbs that would cause
DNS lookups. In the above example the `include:_spf.google.com`
would cause a DNS lookup. The reason for the "10 lookup limit" is
to make it difficult to leverage the SPF system to create a DDOS
attack on a DNS server.
At StackOverflow, we use many SaaS services and we reached the "10
lookup limit" years ago. We would like to unroll or "inline" the
includes but it would become a maintenance nightmare. What if we
unrolled the SPF include required for Google GSuite and then Google
changed the contents of the SPF records?
We figured that DNSControl could do a better job.
## Better comments
Here's how we define our SPF record:
var SPF_SO_LIST = [
'v=spf1',
'ip4:198.252.206.0/24', // ny-mail*
'ip4:192.111.0.0/24', // co-mail*
'include:_spf.google.com', // GSuite
'include:mailgun.org', // Greenhouse.io
'include:spf-basic.fogcreek.com', // Fogbugz
'include:mail.zendesk.com', // Zenddesk
'include:servers.mcsv.net', // MailChimp (Ticket#12345)
'include:sendgrid.net', // SendGrid
'include:spf.mtasv.net', // Desk.com
'~all'
].join(" ");
D('example.com', ...
TXT("@", SPF_SO_LIST),
...
)
The first thing you'll notice is that by defining it this way each
component can include a comment explaining what it is for. This
is important because, and we're not kidding here, for a long time
we didn't know what `include:spf.mtasv.net` was for and we were
afraid to remove it. Finally someone remembered that it was for
Desk.com and we breathed a sigh of relief. You'll also notice that
the Mailchimp entry includes the ticket number of the request to
add it. Now we can refer to that ticket to better understand the
history.
In summary, listing your SPF record like this makes it easier to
maintain a complex SPF record. Certainly you agree that this is
better than `var SPF_SO_LIST = 'v=spf1 'ip4:198.252.206.0/24 'ip4:192.111.0.0/24 'include:_spf.google.com 'include:mailgun.org 'include:spf-basic.fogcreek.com 'include:mail.zendesk.com 'include:servers.mcsv.net 'include:sendgrid.net include:spf.mtasv.net ~all'`
However, we can do better.
# Better macros
Because we don't want to have to remember the "@", and because we
use the same SPF record for multiple domains (any domain that is
attached to our GSuite account), we define a macro called SPF for
use with many domains:
var SPF = [ TXT("@", SPF_SO_LIST) ]
D('example.com', ...
SPF,
...
)
D('otherexample.com', ...
SPF,
...
)
This is a lot less typing. It is also less error-prone: you don't have to remember the `'@'`.
However, we can do better.
# SPF optimizer
As mentioned before, SPF records are intentionally limited to 10
verbs that would cause DNS lookups. This count includes recursive
includes. For example, if you use an `include:` that includes 5
other domains, that's 6 lookups. That leaves you to only 4 more
lookups.
We figured that DNSControl could do better. It could analyze an SPF
record and flatten it to reduce the number of lookups.
However, we're very paranoid. If we break email, a lot of people
notice. Therefore our "flattening" system has some safety rules:
* The system is "opt in". You must specify exactly which includes will be flattened. We recommend you only flatten the minimum needed.
* The flattening works off a cached copy of the DNS lookups. We are concerned
that if someone else's DNS server is down, the optimizer will break and you
won't be able to `dnscontrol push`, which would be very bad especially in
an emergency. Therefore. the process runs off a file called FILLIN but will
warn you if the file needs updating. The updates are easy to do (DNSControl generates
the new file for you to use).
So what does it look like?
Add metadata to the TXT records:
* `flatten: "foo,bar"` (flatten include:foo and include:bar)
* `split: "_spf%d"` (if additional DNS records must be generated, make the labels `_spf1`, `_spf2`, `_spf3`, and so on.)
Here's an example:
var SPF = [
TXT("@", SPF_SO_LIST, {flatten: "spf-basic.fogcreek.com,spf.mtasv.net", split: "_spf%d"}),
TXT("_rawspf", SPF_SO_LIST) // keep unmodified availible for other tools
]
D('example.com', ...
SPF,
...
)
As a result:
* TXT record on `example.com` will be optimized.
* TXT record on `_rawspf.example.com` is the unoptimized version, used purely for demonstration purposes.
You'll notice that we only flatten 2 of all the includes. These are sufficient to get
us to only 10 lookups. They're also the 2 domains that SPF records are the least important.
Thus, if their SPF records change and we don't notice, we won't be too greatly affected.
# Operational Guide
FILL IN THE SEQUENCE OF COMMANDS TO MAINTAIN THE CACHE.
# Interactive mode
FILL IN INFO ABOUT THE INTERACTIVE MDOE.
# Future
We'd like to add other optimizations such as:
* De-dup
* Remove overlapping CIDR blocks

38
docs/toc.md Normal file
View file

@ -0,0 +1,38 @@
---
layout: default
---
## Getting Started
### [Getting Started]({{site.github.url}}/getting-started): A walk-through of the basics.
### [Providers]({{site.github.url}}/provider-list): Which DNS providers are supported.
### [Examples]({{site.github.url}}/examples): The DNSControl language by example.
### [Migrating]({{site.github.url}}/migrating): Migrating zones to DNSControl.
## Reference
### [Language Reference]({{site.github.url}}/js): Description of the DNSControl language (DSL).
### [ALIAS / ANAME records in dnscontrol]({{site.github.url}}/alias)
### [Why CNAME/MX/NS targets require a trailing "dot"]({{site.github.url}}/why-the-dot)
## Advanced Topics
### [Testing]({{site.github.url}}/unittests): Unit Testing for you DNS Data.
### [SPF Optimizer]({{site.github.url}}/spf): Optimize your SPF records.
## Developer info
### [github](https://github.com/StackExchange/dnscontrol): Get the source!
### [Writing Providers]({{site.github.url}}/writing-providers)
### [Adding new DNS record types]({{site.github.url}}/adding-new-rtypes)

View file

@ -1,6 +1,10 @@
---
layout: default
---
# Unit Testing DNS Data
## Testing
## Built-in Tests
DNSControl performs a number of tests during the validation stage.
You can find them in `pkg/normalize/validate.go`.