ASSALAMU'ALAIKUM WR.WB
WELCOME TO VISIT MY BLOG AND DON'T FORGET TO COMMENT MY BLOG,BECAUSE YOUR COMMENT IS MY INSPIRATION......

DHCP SERVER DEBIAN LENNY 5

DHCP SERVER DEBIAN LENNY 5


1 Install paket buat bikin DHCP SERVER dulu nama paketnya adalah DHCP3. Ketikkan perintah seperti ini:
# apt-get dhcp3-server

2 Kalau sudah masuk ke folder /etc/dhcp3 :
# cd /etc/dhcp3

3 Setelah masuk didalamnya ada beberapa file dan folder seperti berikut:
dhclient.conf dhclient-enter-hooks.d dhclient-exit-hooks.d dhcpd.conf
kemudian edit file dhcpd.conf,dengan cara sebagai berikut :
# vim dhcpd.conf
Maka akan muncul seperti ini:
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "abdul.com";
option domain-name-servers www.abdul.com, mail.abdul.com;


default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.26 192.168.0.30;
option domain-name-servers www.abdul.com;
option domain-name "abdul.com";
option routers 192.168.0.1;
option broadcast-address 192.168.0.254
default-lease-time 600;
max-lease-time 7200;
}


# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename "vmunix.passacaglia";

# server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
iodyrttwrxsr43fdes3
#}

# server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of "foo";
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}

Setelah sudah jangan lupa di save dengan cara seperti ini....
Tekan Esc:wq

Setelah si save,jangan lupa di restart dengan perintah kayak gini......
# /etc/init.d/dhcp3-server restart

Read More..

SETTING IP ADDRESS DAN DNS SERVER DEBIAN LENNY 5

SETTING IP ADDRESS DEBIAN LENNY 5


1 Sebelum masuk ke DNS SERVER kita setting dulu ip addressnya terlebih dahulu yaaaaaa..... caranaya masuk terlebih dahulu ke root caranya seperti ini……

# su

(masukkan password root)



2 Langsung aja setting ip addressnya dengan cara seperti ini:
# vim /etc/network/interfaces

Maka akan muncul gini……………
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces (5)
# The loopback network interface auto lo
Iface lo inet loopback
#The primary network interface
Allow-hotplug eth0
Iface eth0 inet static
Address : 192.168.0.1
Netmask : 255.255.255.0
Network : 192.168.0.0
Broadcast: 192.168.0.255
Gateway : 192.168.0.1
# dns-* options are implemented by the resolvconf package if installed
Dns-nameservers 192.168.0.1
Dns-search abdul.com


-->Setelah it JANGAN LUPA DI SAVE YA………. caranya mudah kok,emmm tekan Esc : wq

Untuk lebih cepat pakai cara gini --> ifconfig 192.168.0.1/24

Kemudian jangan lupa di -->ifup eth0

Setelah sudah,jangan lupa di restart dengan perintah kayak gini…….
# /etc/init.d/networking restart

DNS SERVER

1 Install paket buat bikin DNS dulu nama paketnya adalah BIND9. Ketikkan perintah seperti ini:
# apt-get install bind9

2 Kalau sudah masulk ke folder /etc/bind :
# cd /etc/bind

Setelah masuk didalamnya ada beberapa file dan folder seperti berikut:
db.0 db.255 db.local named.conf named.conf.option zones.rfc1918
db.127 db.empty db.root named.conf.local rndc.key


3 kemudian edit file named.conf,dengan cara sebagai berikut :
# vim named.conf

maka akan muncul teks yang seperti dibawah ini :
// This is the primary configuration file for the BIND DNS server named.
//
// please read /usr/share/doc/bind9/README.Debian.gz for informationon the
// structure of BIND configuration files in debian, *BEFORE* you customize
//this configuration file.
//
// If you are just adding zones, please do that in
/etc/bind/named.conf.local
Include “/etc/bind/named.conf.option”;
// prime the server with knowledge of the root servers
zone “.” {
type hint;
file “/etc/bind/db.root”;
};
// be authoritative for the localhost forward and revers zones,and for
// broadcast zones as per RFC 1912
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”;
};

zone “abdul.com” {
type master;
file “/etc/bind/db.nama”
};


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


Include “/etc/bind/named.conf.local”;
-->Setelah it JANGAN LUPA DI SAVE YA………. caranya mudah kok,emmm tekan Esc : wq

4 kemudian copy file db.local ke db.nama,caranya gini……
# cp db.local db.nama

5 setelah it edit db.namanya,dengan cara gini……
# vim db.nama

Maka akan muncul teks seperti ini:
;
; BIND data file for local loopback interfaces
;
STTL 604800
@ IN SOA abdul.com. root.abdul.com
(





;
@ IN NS abdul.com.
@ IN A abdul.com.
@ IN AAAA : :1
www IN CNAME abdul.com.
mail IN CNAME abdul.com.


-->Setelah it JANGAN LUPA DI SAVE YA………. caranya mudah kok,emmm tekan Esc : wq

6 Selanjutnya kemudian copy file db.127 ke db.ip,caranya gini……
# cp db.127 db.ip
7 setelah it edit db.namanya,dengan cara gini……
# vim db.ip
Maka akan muncul teks seperti ini:
;
; BIND reverse data file for local loopback interfaces
;
STTL 604800
@ IN SOA abdul.com. root.abdul.com.
(
2 ;Serial
604800 ;Refresh
86400 ;Retry
2419200 ;Expire
604800 ;Negativecache TTL
;
@ IN NS abdul.com.
1 IN PTR abdul.com.

Setelah it JANGAN LUPA DI SAVE YA………. caranya mudah kok,emmm tekan Esc : wq
8 Restartlah paket bind pake perintah kayak gini yaaaaaa……………….
# /etc/init.d/bind9 restart
kalau udah cek hasilnya dengan perintah gini……
# nslookup abdul.com
kalau udah jalan maka akan muncul pesan seperti9 di bawah ini…………
Server: 192.168.0.1
Address: 192.168.0.1#xx

Name: abdul.com
Address: 192.168.0.1

DNS jalankan dan sukses….tp kalau belum coba masuk ke resolf.conf,dengan cara mengeditnya …..
# vim /etc/resolf.conf
search :abdul.com
Name Server: 192.168.0.1

Setelah it JANGAN LUPA DI SAVE YA………. caranya mudah kok,emmm tekan Esc : wq



AKHIRNYA DNS SERVER GUE JADIIIIIII........


Read More..
~~~~~~~bye-bye~~~~~~~~
Powered By Blogger