November 25, 2024, 05:40:24 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: DNS configuration in proxy squid server (Squid server is already working)  (Read 6039 times)

Offline nmmurali

  • Linux Noob !
  • *
  • Posts: 7
Dear Friends,

First i need to thanks for all friends because we are sharing key points in linux

NOTE: Requesting for all iam in new in linux please help me

Q. Iam using Cent OS 5.4 Final in my system already i configured squid proxy server and its working fine proxy server IP : 192.168.2.2

 Now i want to configure DNS and DHCP in the same system. I configured DNS server like this

/var/named/chroot/etc/named.conf file look like this

*************************************************************************************
//
// named.conf for Red Hat caching-nameserver
//

options {

        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";

        forwarders {
                218.248.240.23; 218.248.240.134; 218.248.240.180;     //isp dns ip's
        };

        /*
         * 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;
};

//
// a caching only nameserver config

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};
zone "nomus.com" {
        type master;
        file "nomus.forward";
        allow-update { none; };
};

zone "2.168.192.in-addr.arpa" {
        type master;
        file "nomus.reverse";
        allow-update { none; };
};

//nomus.com is my domain name
//nomus.forward is forward lookup zone file
//nomus.reverse is reverse lookup zone file
//Zones file path is   " /var/named/chroot/var/named/

**************************************************************************
Forward lookup zone file (nomus.forward) look like this

;zone file for nomus.forward
$TTL    86400
@               IN SOA  Firewall.nomus.com. root.nomus.com. (

                                        19990811        ; Serial number
                                        3600            ; 1 hour refresh
                                        300             ; 5 minutes retry
                                        172800          ; 2 days expiry
                                        43200 )         ; 12 hours minimum

                                          IN NS           Firewall.nomus.com.
Firewall.nomus.com      IN A            192.168.2.2


*************************************************************************************

Reverse lookup zone file (nomus.reverse) is look like this

;Zone file for nomus.reverse
$TTL    86400
@       IN      SOA     Firewall.nomus.com. root.nomus.com. (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum

                 IN      NS      Firewall.nomus.com.
2                IN      PTR     Firewall.nomus.com.

*************************************************************************

/etc/resolve.conf flie look like this

; generated by /sbin/dhclient-script
search nomus.com


nameserver 192.168.2.2

****************************************************************

MY PROBLAMS

When iam trying to ping google.com from client system it showing "Unknownhost" but internet is working. At the same time pinging with ip its working.
« Last Edit: April 22, 2010, 05:12:38 AM by nmmurali »

Offline kaushalpatel1982

  • LST CareTaker
  • Linux Learner
  • *****
  • Posts: 87
You need to install caching-nameserver as you server. You can use yum to install it.

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Its wierd ..Are you able to ping the DNS server from your clieint itself? Whats  the gateway  setting for client? Dis u enable forwaders in  /etc/sysctl.conf in your DNS?