Subdomínio curinga do subdomínio

3

Eu tenho o domínio example1.com - DNS gerenciado na Linode.com

Existe um site hospedado em example1.com (1.1.1.2) e funciona bem.

Eu tenho um registro A para example1.com que aponta sub.example1.com para 1.1.2.2

Posso confirmar que os pedidos para sub.example1.com sejam resolvidos para 1.1.2.2, conforme esperado.

Eu adicionei sub.example1.com ao DigitalOcean e vinculei ao meu servidor.

sub.example1.com carrega bem meu site no servidor da DigitalOcean.

Agora, adicionei um curinga% de registro * que aponta para o mesmo 1.1.2.2 (* .sub.example1.com)

Eu esperei o tempo suficiente para a propagação do DNS, mas pings para random.sub.example1.com são falhando porque o host não pode ser localizado.

Por que não posso adicionar um curinga a um subdomínio de um subdomínio? Isso é possível?

    
por Ralph 05.03.2015 / 03:10

2 respostas

4

Algo parece estar mal configurado. Você está tentando definir uma zona DNS separada para o seu subdomínio, mas ela não existe na Internet voltada para os servidores DNS.

Aqui está o que eu vejo, substituindo seu domínio por example.com.ng :

$ dig +trace accounts.example.com.ng SOA

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> +trace accounts.example.com.ng SOA
;; global options: +cmd
.                       130141  IN      NS      l.root-servers.net.
.                       130141  IN      NS      i.root-servers.net.
.                       130141  IN      NS      d.root-servers.net.
.                       130141  IN      NS      e.root-servers.net.
.                       130141  IN      NS      g.root-servers.net.
.                       130141  IN      NS      j.root-servers.net.
.                       130141  IN      NS      k.root-servers.net.
.                       130141  IN      NS      c.root-servers.net.
.                       130141  IN      NS      m.root-servers.net.
.                       130141  IN      NS      a.root-servers.net.
.                       130141  IN      NS      b.root-servers.net.
.                       130141  IN      NS      f.root-servers.net.
.                       130141  IN      NS      h.root-servers.net.
;; Received 488 bytes from 75.75.75.75#53(75.75.75.75) in 15 ms

ng.                     172800  IN      NS      ns1.nic.net.ng.
ng.                     172800  IN      NS      ns2.nic.net.ng.
ng.                     172800  IN      NS      ns3.nic.net.ng.
ng.                     172800  IN      NS      ns4.nic.net.ng.
ng.                     172800  IN      NS      nsa.nic.net.ng.
;; Received 246 bytes from 128.63.2.53#53(128.63.2.53) in 48 ms

example.com.ng.          21600   IN      NS      ns1.linode.com.
example.com.ng.          21600   IN      NS      ns2.linode.com.
example.com.ng.          21600   IN      NS      ns3.linode.com.
;; Received 104 bytes from 194.0.1.29#53(194.0.1.29) in 81 ms

example.com.ng.          86400   IN      SOA     ns1.linode.com. REDACTED.gmail.com. 2015030476 14400 14400 1209600 86400
;; Received 108 bytes from 65.19.178.10#53(65.19.178.10) in 74 ms

Veja que SOA registra no final? Esse não é o registro SOA da sua segunda zona. Não podemos dizer por que esse é o caso, mas até que isso seja corrigido, nenhuma das alterações feitas nesse segundo arquivo de zona influenciará as consultas do DNS.

    
por 05.03.2015 / 03:34
1

Vou compartilhar as respostas que recebi do Linode e do Digital Ocean, pois acredito que elas podem ser úteis para alguém em algum momento:

Linode

I believe the issue you're seeing is due to you not have a DNS zone for your second level domain. As far as I can see you need to create a new zone for accounts.example.com.ng, you will need to create NS records on the example.com.ng zone that point to ns1.linode.com - ns5.linode.com.

Once this has been accomplished you can make a CNAME for the wildcard, pointing to where you intend to point it. You will then want to make an A record for "accounts.example.com.ng" (the hostname field would be blank), which points to any IP address of your choice (even 127.0.0.1).

I hope this helps!

Oceano Digital

I see that you've added the wildcard record to your DNS settings here and it looks correct; however, if the apex domain (example.com.ng) DNS is served by Linode's nameservers, you should add the record there rather than creating a separate DNS zone file here at DigitalOcean. If there are any configuration issues, their Support team can see the DNS records that you're trying to create and would be better able to help.

Let us know if you have any other questions!

Segunda entrada (equipe diferente):

Thanks for taking the time to write in today. This level of DNS service is very much possible. The problem you are facing is that you simply added an A record when you created accounts.example.com.ng. And the *.accounts.example.com.ng record requires an actual subdomain delegation to work. Subdomains require name server records to point to a new server for delegation. If you ran a nameserver on accounts.example.com.ng and delegated the entire zone to that server, then you can have accounts.example.com.ng host *.accounts..example.com.ng.

It would look something similar to this:

ns1.linode.com (authoratative server) - example.com.ng

| -----> ns1.accounts.example.com.ng (authoratative server) - accounts.example.com.ng (DigitalOcean Droplet) | -----> ns1.accounts.example.com.ng A 1.1.2.2 -----> *.accounts.example.com.ng A 1.1.2.2

You could also try testing a double wild card record. It would look similar to this: *.*.example.com.ng A 1.1.2.2

To help better understand wildcard DNS records, I would recommend reading http://en.wikipedia.org/wiki/Wildcard_DNS_record and for a more indepth perspective of the subject please read http://tools.ietf.org/html/rfc4592

Please let us know if there is anything else we can help you with.

Best, Mike DigitalOcean Support Check out our community for great tutorials, articles and FAQs! https://digitalocean.com/community

Vou analisar isso e tentar as soluções sugeridas. Vou atualizar este post com o que funciona!

Atualização: Depois de trocar algumas mensagens com o suporte Linode, consegui configurar o DNS corretamente. Esta foi a resposta que ajudou:

The only way to do this would be to have accounts.example.com.ng set as a separate zone and then within that zone create the A record to the IP that accounts.example.com.ng is currently set to and then set *.accounts.example.com.ng within that zone to the IP you need.

    
por 05.03.2015 / 13:39