# bind ## Name *bind* - overrides the host to which the server should bind. ## Description Normally, the listener binds to the wildcard host. However, you may want the listener to bind to another IP instead. If several addresses are provided, a listener will be open on each of the IP provided. Each address has to be an IP or name of one of the interfaces of the host. Bind by interface name, binds to the IPs on that interface at the time of startup or reload (reload will happen with a SIGHUP or if the config file changes). If the given argument is an interface name, and that interface has serveral IP addresses, CoreDNS will listen on all of the interface IP addresses (including IPv4 and IPv6), except for IPv6 link-local addresses on that interface. ## Syntax In its basic form, a simple bind uses this syntax: ~~~ txt bind ADDRESS|IFACE ... ~~~ You can also exclude some addresses with their IP address or interface name in expanded syntax: ~~~ bind ADDRESS|IFACE ... { except ADDRESS|IFACE ... } ~~~ * **ADDRESS|IFACE** is an IP address or interface name to bind to. When several addresses are provided a listener will be opened on each of the addresses. Please read the *Description* for more details. * `except`, excludes interfaces or IP addresses to bind to. `except` option only excludes addresses for the current `bind` directive if multiple `bind` directives are used in the same server block. ## Examples To make your socket accessible only to that machine, bind to IP 127.0.0.1 (localhost): ~~~ corefile . { bind 127.0.0.1 } ~~~ To allow processing DNS requests only local host on both IPv4 and IPv6 stacks, use the syntax: ~~~ corefile . { bind 127.0.0.1 ::1 } ~~~ If the configuration comes up with several *bind* plugins, all addresses are consolidated together: The following sample is equivalent to the preceding: ~~~ corefile . { bind 127.0.0.1 bind ::1 } ~~~ The following server block, binds on localhost with its interface name (both "127.0.0.1" and "::1"): ~~~ corefile . { bind lo } ~~~ You can exclude some addresses by their IP or interface name (The following will only listen on `::1` or whatever addresses have been assigned to the `lo` interface): ~~~ corefile . { bind lo { except 127.0.0.1 } } ~~~ ## Bugs When defining more than one server block, take care not to bind more than one server to the same address and port. Doing so will result in unpredictable behavior (requests may be randomly served by either server). Keep in mind that *without* the *bind* plugin, a server will bind to all interfaces, and this will collide with another server if it's using *bind* to listen to an interface on the same port. For example, the following creates two servers that both listen on 127.0.0.1:53, which would result in unpredictable behavior for queries in `a.bad.example.com`: ``` a.bad.example.com { bind 127.0.0.1 forward . 1.2.3.4 } bad.example.com { forward . 5.6.7.8 } ``` ption value='dave/zlib'>dave/zlib Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/readFileSync.txt (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-03-16bun.lockbGravatar Jarred Sumner 3-0/+0
2022-03-16Update feature_flags.zigGravatar Jarred Sumner 1-0/+1
2022-03-16[bun.js] Bun.unsafe test should check the gcGravatar Jarred Sumner 1-4/+14
2022-03-16Update work_pool.zigGravatar Jarred Sumner 1-21/+28
2022-03-16Add a way to run serial tasks on a different threadGravatar Jarred Sumner 1-3/+65
2022-03-16fix crash when SyntaxError is thrown and we did not receive an ErrorInstance?Gravatar Jarred Sumner 1-18/+25
2022-03-16[bun.js] Fix release-mode test failures in HeadersGravatar Jarred Sumner 1-47/+42
2022-03-16Update ref_count.zigGravatar Jarred Sumner 1-2/+0
2022-03-15file is too bigjarred/replGravatar Jarred Sumner 1-113827/+0
2022-03-15Update Dockerfile.baseGravatar Jarred Sumner 1-1/+1
2022-03-15Add rust and lolhtml to dockerfileGravatar Jarred Sumner 2-0/+20
2022-03-15bump webkitGravatar Jarred Sumner 1-1/+1
2022-03-15Update WebKitGravatar Jarred Sumner 1-0/+0
2022-03-15:camera:Gravatar Jarred Sumner 60-799/+859
2022-03-15Fix test failureGravatar Jarred Sumner 1-15/+17
2022-03-15[bun:error] handle errors without a name or messageGravatar Jarred Sumner 1-6/+11
2022-03-15Update pool.zigGravatar Jarred Sumner 1-0/+1
2022-03-15Load .env by defaultGravatar Jarred Sumner 2-0/+8
2022-03-15mimalloc interpose is buggyGravatar Jarred Sumner 1-2/+25
2022-03-15higher max http requests for bun.jsGravatar Jarred Sumner 1-0/+29
2022-03-15zero copyGravatar Jarred Sumner 1-21/+15
2022-03-15Update javascript.zigGravatar Jarred Sumner 1-2/+0
2022-03-15[bun.js] utf8 console.{time, count, timeEnd, profile, profileEnd, count, cou...Gravatar Jarred Sumner 1-16/+16