-----------------------------------------------eth0 server --> 182.48.191.117 (public) eth1 server --> 192.168.26.11 eth0 router --> 192.168.26.12 eth1 router --> 192.168.2.1 -----------------------------------Konfigurasi IP Address --> Server login --> root --> $su root password #nano /etc/network/interfaces auto eth0 iface eth0 inet static address 182.48.191.117 network 182.48.191.0 (belakangnya 0) netmask 255.255.255.0 broadcast 182.48.191.0(belakangnya 255) auto eth1 iface eth1 inet static address 192.168.26.11 network 192.168.26.0 (belakangnya 0) netmask 255.255.255.0 broadcast 192.168.26.255 (belakangnya 255) ctrl+X (exit) + Y #nano /etc/hosts yg bawah aja............. ganti IP jadi IP eth0 SERVER (ini tergantung nanti kita pake DNS apa.. nah itu D NS sama kaya hosts & resolv.conf) 182.48.191.117 RESOLV...... #nano /etc/resolv.conf ketik .... nameserver 182.48.191.117 restart.......... # /etc/init.d/networking restart -----------------------------------------------------------------ATUR DNS SERVER install packet DNS #apt-get install bind9 --> y #nano /etc/bind/named.conf.default-zones
tulis ulang..... di bawah 2x (di bawah udah 2x) zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "localhost" { type master; file "/etc/bind/db.local"; };
terus........................ zone yang ke-1 yg pertama diganti jadi --> alamat dns yg mau kita buat. ganti lo cal dengan --> Ex; adi.com. terus file "/etc/bind/db.local" --> local nya diganti jadi adi --> /etc/bind/db.adi kemudian, di zone yg ke-2. yg sama DENGAN RESOLV & HOST: tadi gua ambil eth0, be rarti yg eth0 tulis IP address SERVER --> 182.48.191.117 di "localhost" tapi cara nulisnya dibalik... jadi, 117.191.48.in-addr.arpa in-addr.arpa diambil dari zone diatasnya --------------------------------akan terlihat seperti : zone "adi.com." { type master; file "/etc/bind/db.adi"; }; zone "117.191.48.in-addr.arpa" { type master; file "/etc/bind/db.117"; }; ----------------------------------kemudian keluar (ctrl+X --> y) kemudian copy db.local ke --> db.adi & db.117 #cp /etc/bind/db.local /etc/bind/db.adi #cp /etc/bind/db.local /etc/bind/db.117 TERUS..... konfigurasi db.adi & db.117 PERTAMA### CONFIGURE db.adi dulu.... #nano /etc/bind/db.adi ubah "localhost" -->>>> "adi.com" (semualocalhost diganti adi.com) jadi, tampilannya :
terus, ganti IP 127.0.0.1 --> jadi ip kita 182.48.191.117 kemudian......... di bawah @ yg terakhir tulis : www.adi.com. ctrl+x --> y
IN
A
182.48.191.117
KEDUA## CONFIGURE db.117 #nano /etc/bind/db.117 ubah semua "localhost" jadi --> adi.com. terus, hapus 1 baris @ yg paling bawah...... sama seperti tadi....... ubah semua local host jadi --> adi.com. ganti IP 127.0.0.1 --> jadi 182.48.191.117 kemudian...... dibagian paling bawah tulis ::: 182.48.191.117 IN
PTR
www.adi.com.
####kemudian.... RESTART BIND9 /etc/init.d/bind9 restart TEST PINGGGGG - ping www.adi.com ----------------------------------------------------------------WEB SERVER ---install packet apache2 #apt-get install apache2 ---Konfigurasi Virtual Host #nano /etc/apache2/sites-available/default --- kemudian.... ganti semua "localhost" dengan "adi.com" ServerAdmin
[email protected] kemudian ketik "ServerName" dibawah ServerAdmin ServerName
adi.com
--- kemudian.... ubah "/var/www" pada Document Root jadi --> /var/adi sal jangan di /var/www)
(apapun boleh, a
--- kemudian.... #mkdir /var/adi --- Mempercantik Tampilan Website / BUAT HTML baru... #nano /var/adi/index.html edit..... html ----------------------------------------------------------------Konfigurasi IP Address --> Router SEBELUM CONFIG ROUTER....... pasang dulu eth interface nya.............. #nano /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.26.12 (harus beda....) network 192.168.26.0 (belakangnya 0) netmask 255.255.255.0 broadcast 192.168.26.255 (belakangnya 255) auto eth1 iface eth1 inet static address 192.168.2.1 (beda network ....) network 192.168.2.0 (belakangnya 0) netmask 255.255.255.0 broadcast 192.168.2.255 (belakangnya 255) ctrl+X (exit) + Y #nano /etc/hosts ganti "Router" --> jadi IP kita 192.168.26.12 (eth0 router) # /etc/init.d/networking restart -----------------------------------------------------------------Test ping diri sendiri dulu.... ping 192.168.26.12 ...... kalo ga bisa.... pilih Network adapter... dikanan bawah. Ganti pilihan Not attached ke Internal Network.... Ganti ping lagi.. -----------------------------------------------------------------YG BUAT ULANGAN... - Config Router - IP - DNS - DHCP - Proxy Server - Squid ------------------------------------------------------------------
"""ATUR DHCP SERVER"""" PINDAH ke PC ............ROUTER............... Install packet DHCP3-server #apt-get install dhcp3-server --> y setelah itu, masukkan disc 1 CD Debian (klik kanan icon CD, Debian 6 CD1.iso) #nano /etc/dhcp/dhcpd.conf hapus "#" dari subnet sampe max-lease ganti subnet, netmask, range, dlll --> (IP ROUTER : 192.168.1.1) <-subnet 192.168.2.0 range 192.168.2.10 option option option option
netmask 255.255.255.0 { 192.168.1.50;
domain-name-servers 182.48.191.117; domain-name "adi.com."; routers 192.168.2.1; --> default gateway client broadcast-address 192.168.26.255 --> broadcast ip
default lease time & max lease time GAK DIUBAH bro.. restart --> /etc/init.d/isc-dhcp-server restart ------------------sebelum hubungin ke client.... perintah ke router.... #nano /etc/rc.local --> TULIS INI DIATAS EXIT0 echo 1 > proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE ----------------------------------------------------------LIAT / CHECK web kita.... #w3m www.tkj.net q --> untuk quit ------------------------------------------------------------UNINSTALL PACKET .......... #apt-get purge ...... misalnya : #apt-get purge bind9