Problemas com o DNS do Ubuntu

0

Ubuntu 11.10

O DNS funciona bem com nslookup e dig

sr@sr-ThinkPad-R52:~$ nslookup ocelot.rmg.local
Server:     192.168.0.100
Address:    192.168.0.100#53

Name:   ocelot.rmg.local
Address: 192.168.0.100

sr@sr-ThinkPad-R52:~$ dig ocelot.rmg.local

; <<>> DiG 9.7.3 <<>> ocelot.rmg.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7831
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;ocelot.rmg.local.      IN  A

;; ANSWER SECTION:
ocelot.rmg.local.   10800   IN  A   192.168.0.100

;; AUTHORITY SECTION:
ocelot.rmg.local.   10800   IN  NS  ocelot.rmg.local.

;; Query time: 4 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Sun Jan 15 17:14:41 2012
;; MSG SIZE  rcvd: 64

E curl pode se conectar diretamente a hosts

sr@sr-ThinkPad-R52:~$ curl -I http://192.168.0.100/
HTTP/1.1 200 OK
Date: Sun, 15 Jan 2012 17:15:45 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k PHP/5.3.0
Last-Modified: Sat, 25 Jul 2009 05:17:17 GMT
ETag: "31bdb-13e6-46f80d59a5140"
Accept-Ranges: bytes
Content-Length: 5094
Cache-Control: max-age=60
Expires: Sun, 15 Jan 2012 17:16:45 GMT
MS-Author-Via: DAV
X-Frame-Options: SameOrigin
Content-Type: text/html

mas nada (Firefox, Curl etc.) me permitirá conectar aos hosts via DNS

sr@sr-ThinkPad-R52:~$ curl -I http://ocelot.rmg.local/
curl: (6) Couldn't resolve host 'ocelot.rmg.local'
sr@sr-ThinkPad-R52:~$ curl -I http://google.co.uk/
curl: (6) Couldn't resolve host 'google.co.uk'

Portanto, nslookup e dig resolvem domínios corretamente, mas nada mais o fará. Primeiro DNS funciona bem em qualquer outro lugar na rede.

sr@sr-ThinkPad-R52:~$ sudo cat /etc/resolv.conf 
[sudo] password for sr: 
# Generated by NetworkManager
nameserver 192.168.0.100
sr@sr-ThinkPad-R52:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:41:15:f5:a9  
          inet addr:192.168.0.51  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::216:41ff:fe15:f5a9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:928 errors:0 dropped:0 overruns:0 frame:0
          TX packets:550 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:97057 (97.0 KB)  TX bytes:74362 (74.3 KB)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Conforme solicitado

sr@sr-ThinkPad-R52:~$ dig ipv6.google.com

; <<>> DiG 9.7.3 <<>> ipv6.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3009
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ipv6.google.com.       IN  A

;; ANSWER SECTION:
ipv6.google.com.    604308  IN  CNAME   ipv6.l.google.com.

;; Query time: 311 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Mon Jan 16 16:21:21 2012
;; MSG SIZE  rcvd: 54

sr@sr-ThinkPad-R52:~$ dig ipv6.l.google.com

; <<>> DiG 9.7.3 <<>> ipv6.l.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57474
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ipv6.l.google.com.     IN  A

;; Query time: 124 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Mon Jan 16 16:22:00 2012
;; MSG SIZE  rcvd: 35

Não em uma rede IPV6, então curl não funcionaria para isso de qualquer maneira

    
por Smudge 15.01.2012 / 18:19

1 resposta

1

Você tentou algum outro software? Como ping, telnet, ssh?

Por exemplo, você pode dar a saída de

strace ping google.co.uk
    
por 15.01.2012 / 20:28

Tags