-
Notifications
You must be signed in to change notification settings - Fork 0
/
dnsexplain.php
257 lines (226 loc) · 7.89 KB
/
dnsexplain.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<?php
function mxExplain() {
?>
An MX record (Mail Exchange) determines where emails are forwarded to.
Like CNAME entries, they must point to another domain.
<div class="container mt-3">
<h5>Example</h5>
<table class="table table-dark table-borderless">
<thead>
<tr>
<th>example.com</th>
<th>Type</th>
<th>Priority</th>
<th>Destination</th>
</tr>
</thead>
<tbody>
<tr>
<td>@</td>
<td>MX</td>
<td>10</td>
<td>mail01.example.com</td>
</tr>
<tr>
<td>@</td>
<td>MX</td>
<td>50</td>
<td>mail02.example.com</td>
</tr>
</tbody>
</table>
</div>
<p>
The priority indicates which entry, and therefore which mail server, is preferred. The lowest value is the preferred value.</br>
In this case, email is first attempted to mail01.example.com. If this fails, the email will be sent to mail02.example.com.</br></br>
However, the same priority can also be used to spread the load of incoming emails across both mail servers.
</p>
<?php
}
function aExplain() {
?>
An A record is the most basic type of DNA.
It specifies which IPv4 (server) a domain should point to.
<div class="container mt-3">
<h5>Example</h5>
<table class="table table-dark table-borderless">
<thead>
<tr>
<th>example.com</th>
<th>Type</th>
<th>Destination</th>
</tr>
</thead>
<tbody>
<tr>
<td>@</td>
<td>A</td>
<td>192.0.2.1</td>
</tr>
</tbody>
</table>
</div>
In this example, the domain example.com would point to the server with the IP 192.0.2.1. This can then serve a website, for example.
<?php
}
function aaaaExplain() {
?>
An AAAA record is the most basic type of DNA.
It specifies which IPv6 (server) a domain should point to.
<div class="container mt-3">
<h5>Example</h5>
<table class="table table-dark table-borderless">
<thead>
<tr>
<th>example.com</th>
<th>Type</th>
<th>Destination</th>
</tr>
</thead>
<tbody>
<tr>
<td>@</td>
<td>AAAA</td>
<td>2001:0db8:85a3:0:8a2e:1563:1236</td>
</tr>
</tbody>
</table>
</div>
In this example, the domain example.com would point to the server with the IP 192.0.2.1. This can then serve a website, for example.
<?php
}
function txtExplain() {
?>
A TXT record is a freely definable text field. In theory, anything can be written into this field.</br>
Today it is mainly used to validate domain ownership and to prevent email spam.
<div class="container mt-3">
<h5>Example</h5>
<table class="table table-dark table-borderless">
<thead>
<tr>
<th>example.com</th>
<th>Type</th>
<th>Destination</th>
</tr>
</thead>
<tbody>
<tr>
<td>@</td>
<td>TXT</td>
<td>This is a random text with no purpose</td>
</tr>
<tr>
<td>@</td>
<td>TXT</td>
<td>v=spf1 mx a ~all</td>
</tr>
<tr>
<td>@</td>
<td>TXT</td>
<td>v=DMARC1; p=none; rua=mailto:[email protected]"</td>
</tr>
</tbody>
</table>
</div>
In this example there is a TXT email with a random text. Also the SPF and DMARC records that make sense for the mail traffic.
<?php
}
function cnameExplain() {
?>
A CNAME (canocial name) is an alias record.<br/>
Means:The DNS of another domain is copied with the CNAME record.<br/>
It is important to note that a CNAME can only be created for a subdomain.
<div class="container mt-3">
<h5>Example</h5>
<table class="table table-dark table-borderless">
<thead>
<tr>
<th>example.com</th>
<th>Type</th>
<th>Destination</th>
</tr>
</thead>
<tbody>
<tr>
<td>www</td>
<td>TXT</td>
<td>example.com</td>
</tr>
</tbody>
</table>
</div>
In this example, the subdomain www.example.com clones the DNS of the domain example.com.
<div class="alert alert-warning">
<strong>Attention!</strong> A CNAME is not a forwarding! Domain to domain forwarding must be handled by a server.
</div>
<?php
}
function nsExplain() {
?>
NS means name server. This indicates which servers are responsible for distributing the DNS for the domain or subdomain.
<div class="container mt-3">
<h5>Example</h5>
<table class="table table-dark table-borderless">
<thead>
<tr>
<th>example.com</th>
<th>Type</th>
<th>Destination</th>
</tr>
</thead>
<tbody>
<tr>
<td>coolbuster</td>
<td>NS</td>
<td>ns1.domain.tld</td>
</tr>
</tbody>
</table>
</div>
In this example, the name server ns1.domain.tld is responsible for the DNS for the subdomain coolbuster.example.com.
<?php
}
// MODAL BUTTONS
function mxModal() {
?>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#mxModal">
<img src="assets/feather/info.svg" alt="Info" width="32" height="32">
</button>
<?php
}
function txtModal() {
?>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#txtModal">
<img src="assets/feather/info.svg" alt="Info" width="32" height="32">
</button>
<?php
}
function aModal() {
?>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#aModal">
<img src="assets/feather/info.svg" alt="Info" width="32" height="32">
</button>
<?php
}
function aaaaModal() {
?>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#aaaaModal">
<img src="assets/feather/info.svg" alt="Info" width="32" height="32">
</button>
<?php
}
function cnameModal() {
?>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#cnameModal">
<img src="assets/feather/info.svg" alt="Info" width="32" height="32">
</button>
<?php
}
function nsModal() {
?>
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#nsModal">
<img src="assets/feather/info.svg" alt="Info" width="32" height="32">
</button>
<?php
}
?>