mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 15:43:54 +02:00
Prevent DNS rebinding (#1049)
This commit is contained in:
parent
e0c317a958
commit
b86ebe20d7
4 changed files with 53 additions and 1 deletions
|
@ -94,6 +94,7 @@ server={{ local_service_ip }}#5353
|
||||||
{% for host in dns_servers.ipv4 %}
|
{% for host in dns_servers.ipv4 %}
|
||||||
server={{ host }}
|
server={{ host }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
stop-dns-rebind
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# and this sets the source (ie local) address used to talk to
|
# and this sets the source (ie local) address used to talk to
|
||||||
|
|
|
@ -7,6 +7,13 @@
|
||||||
include_tasks: freebsd.yml
|
include_tasks: freebsd.yml
|
||||||
when: ansible_distribution == 'FreeBSD'
|
when: ansible_distribution == 'FreeBSD'
|
||||||
|
|
||||||
|
- name: dnscrypt-proxy ip-blacklist configured
|
||||||
|
template:
|
||||||
|
src: ip-blacklist.txt.j2
|
||||||
|
dest: "{{ config_prefix|default('/') }}etc/dnscrypt-proxy/ip-blacklist.txt"
|
||||||
|
notify:
|
||||||
|
- restart dnscrypt-proxy
|
||||||
|
|
||||||
- name: dnscrypt-proxy configured
|
- name: dnscrypt-proxy configured
|
||||||
template:
|
template:
|
||||||
src: dnscrypt-proxy.toml.j2
|
src: dnscrypt-proxy.toml.j2
|
||||||
|
|
|
@ -343,7 +343,7 @@ cache_neg_max_ttl = 600
|
||||||
|
|
||||||
## Path to the file of blocking rules (absolute, or relative to the same directory as the executable file)
|
## Path to the file of blocking rules (absolute, or relative to the same directory as the executable file)
|
||||||
|
|
||||||
# blacklist_file = 'ip-blacklist.txt'
|
blacklist_file = 'ip-blacklist.txt'
|
||||||
|
|
||||||
|
|
||||||
## Optional path to a file logging blocked queries
|
## Optional path to a file logging blocked queries
|
||||||
|
|
44
roles/dns_encryption/templates/ip-blacklist.txt.j2
Normal file
44
roles/dns_encryption/templates/ip-blacklist.txt.j2
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
0.0.0.0
|
||||||
|
10.*
|
||||||
|
127.*
|
||||||
|
169.254.*
|
||||||
|
172.16.*
|
||||||
|
172.17.*
|
||||||
|
172.18.*
|
||||||
|
172.19.*
|
||||||
|
172.20.*
|
||||||
|
172.21.*
|
||||||
|
172.22.*
|
||||||
|
172.23.*
|
||||||
|
172.24.*
|
||||||
|
172.25.*
|
||||||
|
172.26.*
|
||||||
|
172.27.*
|
||||||
|
172.28.*
|
||||||
|
172.29.*
|
||||||
|
172.30.*
|
||||||
|
172.31.*
|
||||||
|
192.168.*
|
||||||
|
::ffff:0.0.0.0
|
||||||
|
::ffff:10.*
|
||||||
|
::ffff:127.*
|
||||||
|
::ffff:169.254.*
|
||||||
|
::ffff:172.16.*
|
||||||
|
::ffff:172.17.*
|
||||||
|
::ffff:172.18.*
|
||||||
|
::ffff:172.19.*
|
||||||
|
::ffff:172.20.*
|
||||||
|
::ffff:172.21.*
|
||||||
|
::ffff:172.22.*
|
||||||
|
::ffff:172.23.*
|
||||||
|
::ffff:172.24.*
|
||||||
|
::ffff:172.25.*
|
||||||
|
::ffff:172.26.*
|
||||||
|
::ffff:172.27.*
|
||||||
|
::ffff:172.28.*
|
||||||
|
::ffff:172.29.*
|
||||||
|
::ffff:172.30.*
|
||||||
|
::ffff:172.31.*
|
||||||
|
::ffff:192.168.*
|
||||||
|
fd00::*
|
||||||
|
fe80::*
|
Loading…
Add table
Reference in a new issue