Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I have my router (192.168.1.1) connected to the internet. I have installed Debian on a server with Bind9 (192.168.1.254). The configurations files are : Code: $ cat /etc/network/interfaces # ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    2

    PB : DNS Client don't ping internet

    Hi,

    I have my router (192.168.1.1) connected to the internet.
    I have installed Debian on a server with Bind9 (192.168.1.254).
    The configurations files are :

    Code:
    $ cat /etc/network/interfaces
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0 
    iface eth0 inet static
    address  192.168.1.254
    netmask  255.255.255.0
    network  192.168.1.0
    broadcast  192.168.1.255
    gateway  192.168.1.1
    Code:
    $ cat /etc/bind/named.conf
    include "/etc/bind/named.conf.options";
    include "/etc/bind/named.conf.local";
    include "/etc/bind/named.conf.default-zones";
    Code:
    $ cat /etc/bind/named.conf.options
    options {
    directory "/var/cache/bind";
     forwarders {
     192.168.1.1;
     };
    
    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
    
    version none;
    allow-query { 192.168.1.0/24; };
    allow-transfer { none; };
    };
    Code:
    $ cat /etc/bind/named.conf.local
    zone "mywidi.me" {
         type master;
         file "/etc/bind/db.mywidi.me";
    };
    
    zone "1.168.192.in-addr.arpa" {
         type master;
         file "/etc/bind/db.1.168.192";
    }
    Code:
    $ cat /etc/bind/named.conf.default-zones 
    
    zone "." {
    type hint;
    file "/etc/bind/db.root";
    };
    
    zone "localhost" {
    type master;
    file "/etc/bind/db.local";
    };
    
    zone "127.in-addr.arpa" {
    type master;
    file "/etc/bind/db.127";
    };
    
    zone "0.in-addr.arpa" {
    type master;
    file "/etc/bind/db.0";
    };
    
    zone "255.in-addr.arpa" {
    type master;
    file "/etc/bind/db.255";
    };
    Code:
    $ sudo cat /etc/resolv.conf
    search mywidi.me
    nameserver 192.168.1.254
    From this DNS server, I can ping local hosts and internet (as google.com) .

    I have another server (kind of client DNS) with these settings :
    Code:
    $ cat /etc/network/interfaces
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
    address  192.168.1.160
    netmask  255.255.255.0
    network  192.168.1.0
    broadcast  192.168.1.255
    gateway  192.168.1.254
    Code:
    $ cat /etc/resolv.conf
    search MYWIDI.ME
    nameserver 192.168.1.254
    My problem is this second debian server (without DNS) succeeds to ping other local hosts but fails pinging google.com. The wirest thing is ping succeeds to get google.com ip address as displayed :

    Code:
    $ ping google.com
    PING google.com (74.125.224.50) 56(84) bytes of data.
    but the command is waiting and waiting ...

    Thank you for your help, i will appreciate it

  2. #2
    Just Joined!
    Join Date
    Apr 2010
    Location
    Bangalore, India.
    Posts
    12
    192.168.1.160 machine resolve google.com means your 192.168.1.254 dns working fine. and forward ip in your machine in 192.168.1.254 by this command "echo 1 > /proc/sys/net/ipv4/ip_forward" and after from 192.168.1.160 it will ping.

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,112
    gateway 192.168.1.254
    The second machine should not be using the name server
    as its gateway. They should both use the router as the gateway.

  4. #4
    Just Joined!
    Join Date
    Feb 2011
    Posts
    2
    On the DNS server i have edited /etc/sysctl.conf by enabling
    net.ipva4.ip_forward=1.
    On the test machine i kept the DNS as a gateway and now it works.

    Thnak you for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •