networking:dns:unbound:configure_access
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
networking:dns:unbound:configure_access [2020/11/30 13:04] – created peter | networking:dns:unbound:configure_access [2022/10/08 09:09] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Networking - DNS - Unbound - Configure Access ====== | ====== Networking - DNS - Unbound - Configure Access ====== | ||
+ | |||
+ | Control which clients are allowed to make (recursive) queries to the server. | ||
This example assumes that the LAN sits at 192.168.1.0/ | This example assumes that the LAN sits at 192.168.1.0/ | ||
Line 8: | Line 10: | ||
access-control: | access-control: | ||
</ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | access-control: | ||
+ | access-control: | ||
+ | access-control: | ||
+ | access-control: | ||
+ | access-control: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** By default everything is refused, except for localhost. | ||
+ | |||
+ | Options include: | ||
+ | |||
+ | * **deny** - Drop message. | ||
+ | * **refuse** - Polite error reply. | ||
+ | * **allow** - Recursive ok. | ||
+ | * **allow_setrd** - Recursive ok, rd bit is forced on. | ||
+ | * **allow_snoop** - Recursive and non-recursive ok. | ||
+ | * **deny_non_local** - Drop queries unless can be answered from local-data. | ||
+ | * **refuse_non_local** - Like **< | ||
+ | |||
+ | </ | ||
+ | |||
<WRAP info> | <WRAP info> | ||
Line 14: | Line 44: | ||
The first one is that a DNS server may be used as part of a denial of service attack. | The first one is that a DNS server may be used as part of a denial of service attack. | ||
- | A common technique is to send queries with spoofed IP addresses to exposed recursive DNS servers, which will send their responses to what they think is the computer that made the query in the first place. | + | * A common technique is to send queries with spoofed IP addresses to exposed recursive DNS servers, which will send their responses to what they think is the computer that made the query in the first place. |
+ | * In practice, it means that an attacker can ask the recursive server for a DNS record using a fake IP, and the owner of the IP address that was faked will get the response. | ||
+ | * This means that an evil entity can force a recursive server to flood a victim with DNS responses and therefore use the server as a proxy for a denial of service attack. | ||
- | Another reason is that a local DNS server might contain sensitive DNS entries that are not intended to be known by outsiders. | + | Another reason is that a local DNS server might contain sensitive DNS entries that are not intended to be known by outsiders. |
- | In addition to the Unbound configuration presented here, it is a good idea to block access to your DNS server by using appropriate firewall rules. DNS servers listen for queries at port 53 and may support both UDP and TCP. | + | * If you are using a local zone for naming local resources, such as printers, cameras, and NAS servers, it is better |
- | The access-control directives are self-explanatory. | + | In addition to the Unbound configuration presented here, it is a good idea to block access to your DNS server by using appropriate firewall rules. |
+ | |||
+ | * DNS servers listen for queries at port 53 and may support both UDP and TCP. | ||
+ | |||
+ | The **access-control** directives are self-explanatory. | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Tag access-control ===== | ||
+ | |||
+ | Tag **access-control** with a list of tags (in "" | ||
+ | |||
+ | Clients using this access control element use localzones that are tagged with one of these tags. | ||
+ | |||
+ | < | ||
+ | access-control-tag: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Set action for a particular tag ===== | ||
+ | |||
+ | Set action for a particular tag for a given access control element if you have multiple tag values | ||
+ | |||
+ | The tag used to lookup the action is the first tag match between **access-control-tag** and **local-zone-tag** where " | ||
+ | |||
+ | < | ||
+ | access-control-tag-action: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Set redirect data for particular tag for access control element ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | access-control-tag-data: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Set view for access control element ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | access-control-view: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | https:// | ||
networking/dns/unbound/configure_access.1606741497.txt.gz · Last modified: 2020/11/30 13:04 by peter