You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`disabled`| Do not configure native DNS and do not hijack DNS traffic. |
235
+
|`native`| Set the platform's native interface DNS where possible: per-interface DNS on Windows and Apple platforms, and `systemd-resolved` interface DNS on Linux. |
236
+
|`hijack`| Same as `native`, with additional port 53 hijacking described below. Used by default. |
237
+
238
+
`hijack` adds the following on top of `native`:
239
+
240
+
*On Linux*: only DNS sent to non-local destinations can be intercepted.
241
+
Traffic destined to addresses on the host's own interfaces (such as
242
+
`127.0.0.53` or the host's LAN-side IP) is delivered through the kernel
243
+
`local` routing table before any user rule applies, and `OUTPUT` NAT cannot
244
+
redirect packets going through `lo`.
245
+
246
+
- Without `auto_redirect`, an `iproute2` rule makes port 53 skip the `main`
247
+
table's specific-route lookup, forcing DNS that would otherwise be
248
+
delivered through a directly-attached subnet through the TUN. Destination
249
+
addresses are not rewritten.
250
+
- With `auto_redirect`, an nftables rule DNATs port 53 traffic directly to
251
+
[`dns_address`](#dns_address).
252
+
253
+
*On Windows with [`strict_route`](#strict_route)*: a WFP filter blocks port
254
+
53 traffic going through interfaces other than the TUN.
255
+
256
+
#### dns_address
257
+
258
+
!!! question "Since sing-box 1.14.0"
259
+
260
+
List of DNS server addresses used by [`dns_mode`](#dns_mode).
261
+
262
+
When unset, sing-box derives one address per family by taking the next IP after
263
+
the first IPv4/IPv6 entry in [`address`](#address). Connections toward those
264
+
derived addresses are additionally hijacked into the sing-box DNS module,
265
+
equivalent to a [`hijack-dns`](/configuration/route/rule_action/#hijack-dns)
266
+
route action; this preserves the behaviour from before this option was added.
267
+
268
+
When set, this auto-hijack is not applied; configure an explicit
269
+
[`hijack-dns`](/configuration/route/rule_action/#hijack-dns) route rule if the
0 commit comments