Senin, 29 November 2010

Setting DHCP di Debian 4

Setting DHCP di Debian 4

1. Install dhcp
# apt-get install dhcp3-server

2. edit seperti ini dan hilangkan tanda (#) di dhcp.conf :
# pico /etc/dhcp3/dhcp.conf

cari text ;

# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.4;
range 192.168.1.6 192.168.1.154;
option domain-name-servers 192.168.123.13;
option domain-name “sayko.com”;
option routers 192.168.1.5;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}

> Restart dhcp: # /etc/init.d/dhcp3-server restart

> Dan setting client dg ip dhcp.
Setting DNS Server Di Debian 4

> Install bind9

Dgn perintah : #apt-get install bind9

> copy kn file db.127 menjadi db 192 dan file db.local menjadi db.pephyboy

Dgn perintah :
#cp /etc/bind/db.127 /etc/bind/db.192
#cp /etc/bind/db.local /etc/bind/db.pephyboy

> edit file db.192 :

;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA pephy.com root.pephy.com (
11 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS pephy.com.
13.123.168 IN PTR pephy.com.

> edit juga file db.pephyboy

;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA pephy.com. root.pephy.com. (
12 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS pephy.com.
@ IN A 192.168.123.13
www IN A 192.168.123.13

> Edit lagi named.conf (ganti tulisan localhost dan 127) :

zone “pephy.com” {
type master;
file “/etc/bind/db.pephyboy”;
};

zone “192.in-addr.arpa” {
type master;
file “/etc/bind/db.192?;

};

> Jangan lupa setting interfacenya ;

iface lo inet loopback

iface eth0 inet static
address 192.168.123.13
netmask 255.255.255.0

> Dan setting resolv.conf :

nameserver 192.168.123.13

> Restart interface dan bind9

Dgn perintah :

# /etc/init.d/networking restart
# /etc/init.d/bind9 restart

> Cek dgn perintah ;

#nslookup pephy.com (nama domain yg telah di setting)
#ping pephy.com .