[URGENT !!] Setting DNS Server Menggunakan BIND


Status
Not open for further replies.

Ruby On Rails

Beginner 1.0
Code:
include "/etc/rndc.key";

controls {
        inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};

options {
    /* make named use port 53 for the source of all queries, to allow
         * firewalls to block all ports except 53:
         */

    // query-source    port 53;

    /* We no longer enable this by default as the dns posion exploit
        has forced many providers to open up their firewalls a bit */

    // Put files that named is allowed to write in the data/ directory:
    directory                "/var/named"; // the default
    pid-file                 "/var/run/named/named.pid";
    dump-file                "data/cache_dump.db";
    statistics-file          "data/named_stats.txt";
   /* memstatistics-file     "data/named_mem_stats.txt"; */
    allow-transfer {"none";};
};

logging {
/*      If you want to enable debugging, eg. using the 'rndc trace' command,
 *      named will try to write the 'named.run' file in the $directory (/var/nam                                                                                        ed").
 *      By default, SELinux policy does not allow named to modify the /var/named                                                                                        " directory,
 *      so put the default debug log file in data/ :
 */
    channel default_debug {
            file "data/named.run";
            severity dynamic;
    };
};


// All BIND 9 zones are in a "view", which allow different zones to be served
// to different types of client addresses, and for options to be set for groups
// of zones.
//
// By default, if named.conf contains no "view" clauses, all zones are in the
// "default" view, which matches all clients.
//
// If named.conf contains any "view" clause, then all zones MUST be in a view;
// so it is recommended to start off using views to avoid having to restructure
// your configuration files in the future.

view "localhost_resolver" {
/* This view sets up named to be a localhost resolver ( caching only nameserver                                                                                         ).
 * If all you want is a caching-only nameserver, then you need only define this                                                                                         view:
 */
    match-clients         { 127.0.0.0/24; };
    match-destinations    { localhost; };
    recursion yes;

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

    /* these are zones that contain definitions for all the localhost
     * names and addresses, as recommended in RFC1912 - these names should
     * ONLY be served to localhost clients:
     */
    include "/var/named/named.rfc1912.zones";
};

view "internal" {
/* This view will contain zones you want to serve only to "internal" clients
   that connect via your directly attached LAN interfaces - "localnets" .
 */
    match-clients        { localnets; };
    match-destinations    { localnets; };
    recursion yes;

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

    // include "/var/named/named.rfc1912.zones";
    // you should not serve your rfc1912 names to non-localhost clients.

    // These are your "authoritative" internal zones, and would probably
    // also be included in the "localhost_resolver" view above :

zone "namadomain.info" {
        type master;
        file "/var/named/namadomain.info.zone";
};




};

view    "external" {
/* This view will contain zones you want to serve only to "external" clients
 * that have addresses that are not on your directly attached LAN interface subn                                                                                        ets:
 */
    recursion no;
    // you'd probably want to deny recursion to external clients, so you don't
    // end up providing free DNS service to all takers

    // all views must contain the root hints zone:
    zone "." IN {
        type hint;
        file "/var/named/named.ca";
    };

    // These are your "authoritative" external zones, and would probably
    // contain entries for just your web and mail servers:

    // BEGIN external zone entries

zone "namadomain.info" {
        type master;
        file "/var/named/namadomain.info.zone";
};

};

diatas sih setingan named.conf di vps saya :D sama file zone td itu setingan di vps jg ya coba aja dulu :D

klo di dig kaya gini

Code:
[root@xxxx named]# dig namadomain.info

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6 <<>> cyberdata.info
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9103
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;namadomain.info.                        IN      A

;; ANSWER SECTION:
namadomain.info.         14400   IN      A       ipnya

;; Query time: 48 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat May  4 16:12:20 2013
;; MSG SIZE  rcvd: 48

seperti yang tadi Tuan, bisa cuma ya itu di intodns masih belum fix :(
 

Ruby On Rails

Beginner 1.0
kl masalah di Into DNS bisa saja masalah dengan koneksi IX nya, saya juga punya kadang gitu, kadang resolv kadang gak di intodns, akhirnya saya pakai slave DNS luar negri.


Tapi ga bakalan ngaruh kan Tuan sama vps nya? takutnya nanti ngaruh terus tiba-tiba down deh pas seminar :hammer:
 

andhi

Hosting Guru
kalau liat ini


Code:
www	IN	CNAME	ns1.domain.com.

kok www mengarahnya ke ns ya ?

harusnya kan

Code:
www	IN	CNAME	domain.com.


dan yg mx

Code:
IN	MX 10	ns1.domain.com.

ngarahnya jg ke ns bukan ke domain.com
 

andhi

Hosting Guru
ini apaan yaa

Code:
IN      A       255.255.255.240

subnet kok masuk kesitu ya :confused:
 

Ruby On Rails

Beginner 1.0
kalau liat ini


Code:
www	IN	CNAME	ns1.domain.com.

kok www mengarahnya ke ns ya ?

harusnya kan

Code:
www	IN	CNAME	domain.com.


dan yg mx

Code:
IN	MX 10	ns1.domain.com.

ngarahnya jg ke ns bukan ke domain.com

udah ganti Tuan sama yang Tuan kasih.
yang dulu nya masih ngaruh ga ke dns setting nya kalo diganti?
 

Ruby On Rails

Beginner 1.0
ini apaan yaa

Code:
IN      A       255.255.255.240

subnet kok masuk kesitu ya :confused:

saya ambilnya dari sini, apakah benar seperti itu Tuan, maklum nubie hehe, ngikutin yang dari tutorial.

[root@user sysconfig]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:52:9B:84
inet addr:103.31.xxx.126 Bcast:103.31.xxx.127 Mask:255.255.255.240
inet6 addr: fe80::216:3eff:fe52:9b84/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18801 errors:0 dropped:0 overruns:0 frame:0
TX packets:14099 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1662518 (1.5 MiB) TX bytes:2033992 (1.9 MiB)
Interrupt:11 Base address:0x8000

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:271 errors:0 dropped:0 overruns:0 frame:0
TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28047 (27.3 KiB) TX bytes:28047 (27.3 KiB)

ga ngaruh asal settingannya yg lama ga dimasukin ke named.conf

abis itu restart bindnya

sip sip , makasih banyak Tuan, udah bantuin fast respon lagi .. hehe
daripada nanya sama support provider vps nya, kalo ga dibayar (alias unmaanage) bisanya cuma ngasih link tutorial aja :mad:
 

andhi

Hosting Guru
saya ambilnya dari sini, apakah benar seperti itu Tuan, maklum nubie hehe, ngikutin yang dari tutorial.

subnet sih ga ush dimasukin mas :D

yg perlu dimasukkan saja itu ipnya saja yg ini

Code:
inet addr:103.31.xxx.126

kayanya klo liat dr settingan bindnya untuk file zone nya yg di /var/named/ itu banyak salahnya tu mas
 
Status
Not open for further replies.

Top