todos.
Meu ISP filtra solicitações de DNS. Como exatamente - eu não sei.
Para evitar (ou, pelo menos, atenuar) esse problema, instalei meu próprio BIND em 192.168.3.1.
Aqui está minha configuração:
logging {
channel default_syslog {
print-severity yes;
syslog;
severity notice;
};
};
acl homenets {
192.168.0.0/16;
localhost;
localnets;
};
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
//Lockywolf's edition
recursion yes;
dnssec-validation auto;
dnssec-enable yes;
auth-nxdomain no;
listen-on-v6 { any; };
allow-recursion { homenets; };
};
key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret "TOP_SECRET";
};
//
// a caching only nameserver config
//
zone "." IN {
type hint;
file "caching-example/named.root";
};
zone "localhost" IN {
type master;
file "caching-example/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "caching-example/named.local";
allow-update { none; };
};
// Lockywolf's added zones
zone "lwfhome" IN {
type master;
file "caching-example/lwfhome.zone";
allow-update { key DHCP_UPDATER; };
// allow-transfer { ns1.namecheap.com; };
};
zone "168.192.in-addr.arpa" IN {
type master;
file "caching-example/168.192.in-addr.arpa.zone";
allow-update { key DHCP_UPDATER; };
// allow-transfer { ns1.namecheap.com; };
};
Pelo menos algumas das configurações funcionam bem. Ou seja, posso resolver alguns nomes e www.dnssec-failed.org retorna um SERVFAIL.
MAS:
Os endereços filtrados ainda estão sendo filtrados ... mas de uma maneira estranha.
Quando peço, digamos,
cavar youporn.com + trace + dnssec
Eu recebo uma resposta totalmente falsa:
root@server:~# dig youporn.com +trace +dnssec
; <<>> DiG 9.10.4-P4 <<>> youporn.com +trace +dnssec
;; global options: +cmd
. 463433 IN NS e.root-servers.net.
. 463433 IN NS l.root-servers.net.
. 463433 IN NS a.root-servers.net.
. 463433 IN NS g.root-servers.net.
. 463433 IN NS h.root-servers.net.
. 463433 IN NS d.root-servers.net.
. 463433 IN NS b.root-servers.net.
. 463433 IN NS j.root-servers.net.
. 463433 IN NS c.root-servers.net.
. 463433 IN NS m.root-servers.net.
. 463433 IN NS f.root-servers.net.
. 463433 IN NS i.root-servers.net.
. 463433 IN NS k.root-servers.net.
. 517170 IN RRSIG NS 8 0 518400 20170226170000 20170213160000 61045 . ckPc/tLcnZ7g2jyLswmho73QA4WWPe3gUwyKZtbrxRZas70RSTS58P/Z KwTm+lJGJU+B6/9eOOerFv+qQ+hr9e4u/FNp3+bXDHnPYvsdEnxdr1r8 KMnjjw8vXjD8Qm3A8rLcMRD/kRFO6M8EmqZa9WvFSZHg9AF810c0Zuqf wocYLLbmT5JvuShyE0WBNks5a86vhxzNGjeKvoMg2op8yC3V0efSRZK2 uhcKupd0eSRrer3mNfjFLQFD/WGPMXYCFpPjxnwtDiXnevJ7FP2dkFWH rHHuxM10sXEUMvNKtLn7tJewzyJs5RUZdHiDYigsmKvaAsPy3x6GwDLF 7x8hjA==
;; Received 1044 bytes from 192.168.3.1#53(192.168.3.1) in 0 ms
youporn.com. 1026 IN A 213.167.39.27
;; Received 49 bytes from 192.203.230.10#53(e.root-servers.net) in 1 ms
O que é uma mentira, pelo menos porque os servidores raiz não guardam nenhuma informação sobre 'youporn.com'. Além disso, o ip está errado.
No entanto, quando eu ligo:
cavar youporn.com + trace + dnssec + aaonly
A resposta é surpreendentemente correta:
root@server:~# dig youporn.com +trace +dnssec +aaonly
; <<>> DiG 9.10.4-P4 <<>> youporn.com +trace +dnssec +aaonly
;; global options: +cmd
. 463269 IN NS b.root-servers.net.
. 463269 IN NS h.root-servers.net.
. 463269 IN NS d.root-servers.net.
. 463269 IN NS a.root-servers.net.
. 463269 IN NS e.root-servers.net.
. 463269 IN NS k.root-servers.net.
. 463269 IN NS l.root-servers.net.
. 463269 IN NS m.root-servers.net.
. 463269 IN NS j.root-servers.net.
. 463269 IN NS f.root-servers.net.
. 463269 IN NS i.root-servers.net.
. 463269 IN NS c.root-servers.net.
. 463269 IN NS g.root-servers.net.
. 517006 IN RRSIG NS 8 0 518400 20170226170000 20170213160000 61045 . ckPc/tLcnZ7g2jyLswmho73QA4WWPe3gUwyKZtbrxRZas70RSTS58P/Z KwTm+lJGJU+B6/9eOOerFv+qQ+hr9e4u/FNp3+bXDHnPYvsdEnxdr1r8 KMnjjw8vXjD8Qm3A8rLcMRD/kRFO6M8EmqZa9WvFSZHg9AF810c0Zuqf wocYLLbmT5JvuShyE0WBNks5a86vhxzNGjeKvoMg2op8yC3V0efSRZK2 uhcKupd0eSRrer3mNfjFLQFD/WGPMXYCFpPjxnwtDiXnevJ7FP2dkFWH rHHuxM10sXEUMvNKtLn7tJewzyJs5RUZdHiDYigsmKvaAsPy3x6GwDLF 7x8hjA==
;; Received 1044 bytes from 192.168.3.1#53(192.168.3.1) in 0 ms
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 86400 IN DS 30909 8 2 E2D3C916F6DEEAC73294E8268FB5885044A833FC5459588F4A9184CF C41A5766
com. 86400 IN RRSIG DS 8 1 86400 20170226170000 20170213160000 61045 . UTYkZHzqLF8kqv9+7HVSKaMXwfLPMeLx3YMoU8ZWjTz1FiCjTOFzEp+2 s4hzjucEB7569Ppzru+0UuzTm9tumkSUJoGhBLdfOUi4b6dKTSGb3Ybn GApoSrTGMnMGrtiIApYLhdQ1a9KZ6PaarPwbpOQ6Td+8ClqSCYK3/xdA nyUXCd1qdfYFyC3WPyouoDZsK+Ahc9B2VMnevfB561j5eX2JxNzqnI8a YaVUTrMzKhIL1rK51fRboXcdkVVmJN8eKV/ulXx73W2P2qGNeuuyy9RV MuAFrclZjzrPx2l7AB6Xpy7b9r7SmONc1ekD3RFcXBTF2zEHeepwRSzg bR1L9w==
;; Received 863 bytes from 199.7.91.13#53(d.root-servers.net) in 57 ms
youporn.com. 172800 IN NS ns1.p44.dynect.net.
youporn.com. 172800 IN NS ns2.p44.dynect.net.
youporn.com. 172800 IN NS ns3.p44.dynect.net.
youporn.com. 172800 IN NS ns4.p44.dynect.net.
youporn.com. 172800 IN NS sdns3.ultradns.net.
youporn.com. 172800 IN NS sdns3.ultradns.com.
youporn.com. 172800 IN NS sdns3.ultradns.org.
youporn.com. 172800 IN NS sdns3.ultradns.biz.
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN NSEC3 1 1 0 - CK0Q1GIN43N1ARRC9OSM6QPQR81H5M9A NS SOA RRSIG DNSKEY NSEC3PARAM
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN RRSIG NSEC3 8 2 86400 20170218054619 20170211043619 31697 com. CEbyhokcC5jQBv+v5W2XQt6rpLb6sLXLpAiOf34X2grUTdlMQfbUInmV MDwYVpuK+lK/CSwRrCWvP3k/7QqwsC4AkveIoi3WMfvAZMTkhMV6an2x FH3jeym2vFA3XSYTBaLIE7ut/MzrZci5qfdGqufBB04OcKLhKNKLRI1J HiI=
PUFL8VGRQ3N4TC6QV3G2R207UO9KDLM8.com. 86400 IN NSEC3 1 1 0 - PUFN28L13OQTHBV8S731Q0AG2FJBS4QT NS DS RRSIG
PUFL8VGRQ3N4TC6QV3G2R207UO9KDLM8.com. 86400 IN RRSIG NSEC3 8 2 86400 20170220053808 20170213042808 31697 com. wtNzw5INtkN3aUd90oZJX/i/eQGSb4WG2zcXtIY1QXP1YddWOUhNcU8x kynuuaGJrFPQdskDnDs8w61xhBAL7r4VDii/vAfCIV65KFxHcSL1/GMB KRY5dnUyUfCNnC88zxoIEUqdmiQCLgjpHPgZ1WcaMKOHTTaMY5L0IPeW WXo=
;; Received 885 bytes from 192.54.112.30#53(h.gtld-servers.net) in 25 ms
youporn.com. 300 IN A 31.192.120.44
youporn.com. 86400 IN NS sdns3.ultradns.biz.
youporn.com. 86400 IN NS ns2.p44.dynect.net.
youporn.com. 86400 IN NS sdns3.ultradns.org.
youporn.com. 86400 IN NS ns1.p44.dynect.net.
youporn.com. 86400 IN NS ns3.p44.dynect.net.
youporn.com. 86400 IN NS sdns3.ultradns.com.
youporn.com. 86400 IN NS ns4.p44.dynect.net.
youporn.com. 86400 IN NS sdns3.ultradns.net.
;; Received 264 bytes from 204.13.250.44#53(ns2.p44.dynect.net) in 55 ms
Eu não entendo essa configuração. Se o ISP for inteligente o suficiente para falsificar a assinatura dos servidores raiz, por que o último comando funciona?
Se eles não podem fazer isso, por que eu vejo uma resposta falsa para 'youporn.com' em 'servidores-raiz'. Eu esperaria que a hierarquia de confiança funcionasse até os próprios servidores de nomes do youporn, e esperasse receber um IP falso deles (seqüestrado pelo MITM), mas não, eles já conseguiram seqüestrar o primeiro passo.
Alguém poderia me explicar o que está acontecendo?