Install DHCP Server
yum install dhcp
Menuju alamat konfigurasi dasar dhcpd server
cd /usr/share/doc/dhcp-tergantungversi/
Cek isi dalemnya apa, cuma cek aja ga diapa-apa-in koq
# nano dhcpd.conf.sample
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {
# — default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.1.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# — Selects point-to-point node (default is hybrid). Don't change this unless
# — you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.0.128 192.168.0.254;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
Backup settingan default, jadi kalo ada apa-apa gampang nyarinya
# mv /etc/dhcpd.conf /etc/dhcpd.conf.old
Salin dulu dari settingan dasar yang kita cek doang tadi ke file asli, jadi gampang ngeditnya
# cp /usr/share/doc/dhcp-tergantungversi/dhcpd.conf.sample /etc/dhcpd.conf
# cp /usr/share/doc/dhcp-tergantungversi/dhcpd.conf.sample /etc/dhcpd.conf
Konfigurasi settingan dhcp.conf sesuai kehendak kita (admin jaringan).
# nano /etc/dhcpd.conf
ddns-update-style none; # keep it simple for now
ignore client-updates; # here too
DHCPARGS=eth0; # tells it what interface to listen on
subnet 192.168.1.0 netmask 255.255.255.0 {
# — default gateway
option routers 192.168.1.252; # gateway on your eth0 internal interface
option subnet-mask 255.255.255.0; # subnet mask
option domain-name "frastuzi-affan.com"; # domain name given to client
option domain-name-servers 192.168.1.1, 202.134.0.155, 8.8.4.4; #the IP of your ISP's nameservers you're
#using
option time-offset -18000; # Eastern Standard Time – set to what you have
range 192.168.1.128 192.168.1.253; # the range of IP's your clients will get
default-lease-time 21600; # how long the client's will keep the same IP
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server ns1.ispserver.net; # change to your ISP's nameservers
hardware ethernet 00:09:5B:8E:05:67; # hardware MAC
fixed-address 209.242.10.10; # your ISP's nameserver IP
}
host frastuzi {
#next-server ns1.ispserver.net; # change to your PC's nameservers
hardware ethernet 00:0c:29:a6:3c:0e; # hardware MAC
fixed-address 192.168.1.2; # your PC's nameserver IP
}
}
Alamat log dhcp ada di
# tail -f /var/log/messages
Tes apakah konfigurasi DHCP Server sudah benar, kalau ada tulisan " Syntax: OK " maka dapat dipastikan sudah benar
# service dhcpd configtest
Jalankan DHCP Server agar client mendapatkan IP secara otomatis
# service dhcpd restart
Edit Alamat IP eth0
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.1
NETMASK=255.255.255.0
GATEWAY=10.1.10.43
Restart Networking agar perubahan diatas dapat langsung masuk ke sistem
# /etc/init.d/network restart
Coba cek apakah benar alamat IP sudah berubah menjadi 192.168.1.1
# ifconfig
Agar semua client dapat broadcast dhcp dari server
# route add -host 255.255.255.255 dev eth0
Konfigurasi GUI Firewall, Networking, dll di Centos
# setup
Ini dibutuhkan kalo punya 2 Lan Card, eth0 yang terhubung ke NAT dan sebagai pemberi DHCP untuk client, lalu mau di terusin ke eth1 yang terkoneksi dengan internet. Jadi client juga bisa internet-an
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
service iptables save
service iptables restart
service iptables restart
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/sysconfig/network: FORWARD_IPV4=YES
Bagi Yang Butuh Konfigurasi Squid/
Lusca Head Proxy + Mikrotik , Yang lebih Bagus untuk Warnet/ Kantor ,
Game Online dll terutama untuk wilayah Bukittinggi dan Sumbar Silahkan
Hubungi :
Ahmad Rapani
HP : 082170824476
YM : rapani_loebis
Email : rapani_loebis@yahoo.com
FB : Rapani Loebis ( http://www.facebook.com/rapani.loebis )
Website : www.rapani-id.com
Web Design & Programing, Jasa Pembuatan Website murah Di Bukittinggi - Sumbar , Jasa Pembutan Toko Online, Service VPS & Hosting Server, Setting & Instalasi Proxy Server, Instalasi Jaringan & Mikrotik Router, Service & Instalasi Komputer, Laptop
Klik disini Info lebih lengkap
Tidak ada komentar:
Posting Komentar