Debian Codegraph @

upstream/fedora-rawhide/man5/systemd.rr.5

raw
1 '\" t
2 .TH "SYSTEMD\&.RR" "5" "" "systemd 261~rc2" "systemd.rr"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd.rr \- Local static DNS resource record definitions
24 .SH "SYNOPSIS"
25 .PP
26 .RS 4
27 /etc/systemd/resolve/static\&.d/*\&.rr
28 .RE
29 .RS 4
30 /run/systemd/resolve/static\&.d/*\&.rr
31 .RE
32 .RS 4
33 /usr/local/lib/systemd/resolve/static\&.d/*\&.rr
34 .RE
35 .RS 4
36 /usr/lib/systemd/resolve/static\&.d/*\&.rr
37 .RE
38 .SH "DESCRIPTION"
39 .PP
40 *\&.rr
41 files may be used to define resource record sets ("RRsets") that shall be resolvable locally, similar in style to address records defined by
42 /etc/hosts
43 (see
44 \fBhosts\fR(5)
45 for details)\&. These files are read by
46 \fBsystemd-resolved.service\fR(8), and are used to synthesize local responses to local queries matching the defined resource record set\&.
47 .PP
48 These drop\-in files are in JSON format\&. Each file may either contain a single top\-level DNS RR object, or an array of one or more DNS RR objects\&. Each RR object has at least a
49 "key"
50 subobject consisting of a
51 "name"
52 string field and a
53 "type"
54 integer field (which contains the RR type in numeric form)\&. Depending on the chosen type the RR object also has the following fields:
55 .sp
56 .RS 4
57 .ie n \{\
58 \h'-04'\(bu\h'+03'\c
59 .\}
60 .el \{\
61 .sp -1
62 .IP \(bu 2.3
63 .\}
64 For A/AAAA RRs, the RR object should have an
65 "address"
66 field set to either an IP address formatted as string, or an array consisting of 4 or 16 8\-bit unsigned integers for the IP address\&.
67 .RE
68 .sp
69 .RS 4
70 .ie n \{\
71 \h'-04'\(bu\h'+03'\c
72 .\}
73 .el \{\
74 .sp -1
75 .IP \(bu 2.3
76 .\}
77 For PTR/NS/CNAME/DNAME RRs, the RR object should have a
78 "name"
79 field set to the name the record shall point to\&.
80 .RE
81 .PP
82 This JSON serialization of DNS RRs matches the one returned by
83 \fBresolvectl\fR\&.
84 .PP
85 Currently no other RR types are supported\&.
86 .SH "EXAMPLES"
87 .PP
88 \fBExample\ \&1.\ \&Simple A Record\fR
89 .PP
90 To make local address lookups for
91 "foobar\&.example\&.com"
92 resolve to the 192\&.168\&.100\&.1 IPv4 address, create
93 /run/systemd/resolve/static\&.d/foobar_example_com\&.rr:
94 .sp
95 .if n \{\
96 .RS 4
97 .\}
98 .nf
99 {
100 "key" : {
101 "type" : 1,
102 "name" : "foobar\&.example\&.com"
103 },
104 "address" : [ 192, 168, 100, 1 ]
105 }
106 .fi
107 .if n \{\
108 .RE
109 .\}
110
111 .SH "SEE ALSO"
112 .PP
113 \fBsystemd\fR(1), \fBsystemd-resolved.service\fR(8), \fBresolved.conf\fR(5), \fBhosts\fR(5), \fBresolvectl\fR(1)