| 
									
										
										
										
											2016-08-19 17:14:17 -07:00
										 |  |  | # bind
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-04 12:53:07 +00:00
										 |  |  | ## Name
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | *bind* - overrides the host to which the server should bind. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Description
 | 
					
						
							| 
									
										
										
										
											2017-07-24 08:24:53 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | Normally, the listener binds to the wildcard host. However, you may want the listener to bind to | 
					
						
							| 
									
										
										
										
											2018-07-09 13:08:02 +01:00
										 |  |  | another IP instead. | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | If several addresses are provided, a listener will be open on each of the IP provided. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Each address has to be an IP of one of the interfaces of the host. | 
					
						
							| 
									
										
										
										
											2016-08-19 17:14:17 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | ## Syntax
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ~~~ txt | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | bind ADDRESS  ... | 
					
						
							| 
									
										
										
										
											2016-08-19 17:14:17 -07:00
										 |  |  | ~~~ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | **ADDRESS** is an IP address to bind to. | 
					
						
							|  |  |  | When several addresses are provided a listener will be opened on each of the addresses. | 
					
						
							| 
									
										
										
										
											2016-08-19 17:14:17 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | ## Examples
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To make your socket accessible only to that machine, bind to IP 127.0.0.1 (localhost): | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | ~~~ corefile | 
					
						
							| 
									
										
										
										
											2017-09-15 09:56:05 +01:00
										 |  |  | . { | 
					
						
							|  |  |  |     bind 127.0.0.1 | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2016-08-19 17:14:17 -07:00
										 |  |  | ~~~ | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 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* directives, all addresses are consolidated together: | 
					
						
							|  |  |  | The following sample is equivalent to the preceding: | 
					
						
							| 
									
										
										
										
											2018-07-09 13:08:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  | ~~~ corefile | 
					
						
							|  |  |  | . { | 
					
						
							| 
									
										
										
										
											2018-07-09 13:08:02 +01:00
										 |  |  |     bind 127.0.0.1 | 
					
						
							| 
									
										
										
										
											2018-02-14 14:19:32 -05:00
										 |  |  |     bind ::1 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ~~~ |