
Unbound 및 DNSCrypt를 사용하여 Raspberry에 DNS 캐시 서버를 설정하려고 합니다.
Raspberry는 최신 Jessie Lite(헤드리스 Debian 8)를 실행합니다.
저는 널리 사용되는 다음 스크립트를 사용하여 DNSCrypt를 설정합니다.https://github.com/simonclausen/dnscrypt-autoinstall
Unbound와 DNSCrypt는 모두 잘 작동합니다. 내 기본 컴퓨터(192.168.1.64)는 Raspberry(192.168.1.65)의 DNS 서버를 성공적으로 사용하고 로그 파일을 통해 DNSCrypt를 사용하여 Unbound를 볼 수 있습니다.
dig
내 문제는 웹사이트에 가서 Wireshark
표준 쿼리를 반환하여 캡처할 때 어떤 암호화도 표시되지 않는다는 것입니다.
내가 무엇을 놓치고 있나요?
dig
응답 은 다음 과 같습니다 .
$ dig debug.opendns.com txt
; <<>> DiG 9.9.5-9+deb8u8-Raspbian <<>> debug.opendns.com txt
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 17686
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; ENDS: version: 0, flags:; upd: 4096
;; QUESTION SECTION:
;debug.opendns.com. IN TXT
;; AUTHORITY SECTION:
opendns.com. 2560 IN SOA auth1.opendns.com. noc.opendns.com. 1483610050 16384 2048 1048576 2560
;; Query time: 143 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Jan 05 11:02:24 CET 2017
;; MSG SIZE rcvd: 92
이것은 Unbound의 로그입니다:
[1483616499] unbound[5098:0] debug: module config: "iterator"
[1483616499] unbound[5098:0] notice: init module 0: iterator
[1483616499] unbound[5098:0] debug: target fetch policy for level 0 is 3
[1483616499] unbound[5098:0] debug: target fetch policy for level 1 is 2
[1483616499] unbound[5098:0] debug: target fetch policy for level 2 is 1
[1483616499] unbound[5098:0] debug: target fetch policy for level 3 is 0
[1483616499] unbound[5098:0] debug: target fetch policy for level 4 is 0
[1483616499] unbound[5098:0] debug: Forward zone server list:
[1483616499] unbound[5098:0] info: DelegationPoint<.>: 0 names (0 missing), 1 addrs (0 result, 1 avail) parentNS
[1483616499] unbound[5098:0] debug: cache memory msg=33040 rrset=33040 infra=1304 val=0
[1483616499] unbound[5098:0] info: start of service (unbound 1.4.22).
[1483616505] unbound[5098:0] debug: iterator[module 0] operate: extstate:module_state_initial event:module_event_new
[1483616505] unbound[5098:0] info: resolving www.google.com. A IN
[1483616505] unbound[5098:0] info: processQueryTargets: www.google.com. A IN
[1483616505] unbound[5098:0] info: sending query: www.google.com. A IN
[1483616505] unbound[5098:0] debug: sending to target: <.> 127.0.0.1#40
[1483616505] unbound[5098:0] debug: cache memory msg=33040 rrset=33040 infra=1533 val=0
[1483616505] unbound[5098:0] debug: iterator[module 0] operate: extstate:module_wait_reply event:module_event_reply
[1483616505] unbound[5098:0] info: iterator operate: query www.google.com. A IN
[1483616505] unbound[5098:0] info: response for www.google.com. A IN
[1483616505] unbound[5098:0] info: reply from <.> 127.0.0.1#40
[1483616505] unbound[5098:0] info: query response was ANSWER
[1483616505] unbound[5098:0] info: finishing processing for www.google.com. A IN
이것은 Unbound의 구성 파일입니다.
server:
auto-trust-anchor-file: "/var/lib/unbound/root.key"
server:
username: unbound
port: 53
logfile: "/var/log/unbound/unbound.log"
log-time-ascii: no
use-syslog: no
verbosity: 3
module-config: "iterator"
do-not-query-localhost: no
interface: 0.0.0.0
access-control: 127.0.0.1 allow
access-control: 192.168.1.0/24 allow
access-control: 10.8.0.0/24 allow
forward-zone:
name: "."
forward-addr: 127.0.0.1@40
forward-first: no
remote-control:
control-enable: no
다음은 스크립트에 의해 생성된 DNSCrypt 구성입니다.
DNSCRYPT_LOCALIP=127.0.0.1
DNSCRYPT_LOCALPORT=40
DNSCRYPT_USER=dnscrypt
DNSCRYPT_RESOLVER=ns0.dnscrypt.is
답변1
Wireshark 캡처는 소스와 대상이 모두 로컬 IP 주소임을 보여줍니다.
따라서 이는 컴퓨터와 Raspberry Pi 사이의 트래픽을 기록합니다. 이는 일반 DNS 트래픽입니다. 암호화된 트래픽은 ns0.dnscrypt.is
Raspberry Pi와 파서 사이에 위치하며 인터넷으로 이동하는 트래픽입니다.
여기서 패킷 캡처를 수행해야 합니다.
또는 컴퓨터와 Raspberry Pi 간의 트래픽을 인증하려면 클라이언트 에이전트가 컴퓨터에서 실행되고 있어야 하며 Raspberry Pi에서는 DNSCrypt 서버(dnscrypt-wrapper 또는 dnsdist)를 실행해야 합니다.