<---- template headericclude ----->
[SOLVED] DNS on Linux
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DNS on Linux

    I have two Fedora VM, with DNS configured (almost) on one.

    On DNS configured machine, i get the following output with dig

    Code:
    [root@fedora ~]# dig www.google.com
    
    ; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc15 <<>> www.google.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45257
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 4, ADDITIONAL: 4
    
    ;; QUESTION SECTION:
    ;www.google.com.                        IN      A
    
    ;; ANSWER SECTION:
    www.google.com.         601813  IN      CNAME   www.l.google.com.
    www.l.google.com.       300     IN      A       173.194.79.105
    www.l.google.com.       300     IN      A       173.194.79.106
    www.l.google.com.       300     IN      A       173.194.79.147
    www.l.google.com.       300     IN      A       173.194.79.99
    www.l.google.com.       300     IN      A       173.194.79.103
    www.l.google.com.       300     IN      A       173.194.79.104
    
    ;; AUTHORITY SECTION:
    google.com.             169813  IN      NS      ns3.google.com.
    google.com.             169813  IN      NS      ns4.google.com.
    google.com.             169813  IN      NS      ns1.google.com.
    google.com.             169813  IN      NS      ns2.google.com.
    
    ;; ADDITIONAL SECTION:
    ns1.google.com.         169813  IN      A       216.239.32.10
    ns2.google.com.         169813  IN      A       216.239.34.10
    ns3.google.com.         169813  IN      A       216.239.36.10
    ns4.google.com.         169813  IN      A       216.239.38.10
    
    ;; Query time: 200 msec
    ;; SERVER: 192.168.0.117#53(192.168.0.117)
    ;; WHEN: Sun Jul 15 01:32:29 2012
    ;; MSG SIZE  rcvd: 284
    and /etc/resolv.conf reads

    Code:
    [root@fedora ~]# cat /etc/resolv.conf
    # Generated by NetworkManager
    domain mynetwork.internal
    search mynetwork.internal
    nameserver 192.168.0.117
    nameserver 192.168.0.1
    192.168.0.1 being my wireless router.

    On the second machine, which doesn't has BIND or DNS configured
    /etc/resolv.conf reads

    Code:
    [root@fed ~]# cat /etc/resolv.conf
    # Generated by NetworkManager
    domain mynetwork.internal
    search mynetwork.internal
    nameserver 192.168.0.117
    nameserver 192.168.0.1
    and i can ping the DNS machine too

    Code:
    [root@fed ~]# ping 192.168.0.117
    PING 192.168.0.117 (192.168.0.117) 56(84) bytes of data.
    64 bytes from 192.168.0.117: icmp_req=1 ttl=64 time=0.024 ms
    64 bytes from 192.168.0.117: icmp_req=2 ttl=64 time=4.04 ms
    64 bytes from 192.168.0.117: icmp_req=3 ttl=64 time=5.87 ms
    ^C
    --- 192.168.0.117 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2014ms
    rtt min/avg/max/mdev = 0.024/3.314/5.872/2.443 ms
    but it does not uses my DNS machine to resolve the name

    Code:
    [root@fed ~]# dig www.google.com
    
    ; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc15 <<>> www.google.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27182
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.google.com.                        IN      A
    
    ;; ANSWER SECTION:
    www.google.com.         43096   IN      CNAME   www.l.google.com.
    www.l.google.com.       196     IN      A       74.125.127.106
    www.l.google.com.       196     IN      A       74.125.127.104
    www.l.google.com.       196     IN      A       74.125.127.105
    www.l.google.com.       196     IN      A       74.125.127.103
    www.l.google.com.       196     IN      A       74.125.127.147
    www.l.google.com.       196     IN      A       74.125.127.99
    
    ;; Query time: 8 msec
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    ;; WHEN: Sun Jul 15 01:37:35 2012
    ;; MSG SIZE  rcvd: 158
    When i force it to use my DNS machine, i get the following output.

    Code:
    [root@fed ~]# dig @192.168.0.117 www.google.com
    
    ; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc15 <<>> @192.168.0.117 www.google.com
    ; (1 server found)
    ;; global options: +cmd
    ;; connection timed out; no servers could be reached
    What am i doing wrong?
    Last edited by Azhar; 15th July 2012 at 10:35 AM.

  2. #2
    Join Date
    Apr 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Re: DNS on Linux

    Code:
    service iptables stop
    And it worked fine...

  3. #3
    Join Date
    Oct 2009
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DNS on Linux

    Quote Originally Posted by Azhar
    Code:
    service iptables stop
    And it worked fine...
    Rather than stopping the firewall altogether, did you consider just forwarding port 53 through?

Similar Threads

  1. Replies: 1
    Last Post: 5th September 2011, 02:54 PM
  2. Replies: 1
    Last Post: 19th February 2010, 02:34 AM
  3. Triple boot linux/linux/linux
    By Steven.Buschie in forum Linux Chat
    Replies: 1
    Last Post: 15th December 2008, 08:11 PM
  4. Replies: 0
    Last Post: 19th March 2008, 04:19 AM
  5. Replies: 0
    Last Post: 23rd January 2007, 01:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]