You are on page 1of 9

KONFIGURASI SERVER PADA LINUX DEBIAN

Hub/switch Internet PC CLIENT SERVER Ip address : 192.168.50.20 Netmask : 255.255.255.0 Address : 192.168.50.1 Gateway : 192.168.50.1 Netmask : 255.255.255.0 192.168.50.0 Broadcast 192.168.50.255 Gateway 192.168.50.1 Dns-server : 202.134.0.155 : 192.168.5.254 Gateway : : 192.168.5.255 Broadcast : IP Virtual Address Netmask : 192.168.5.32 :255.255.255.0 Network : IP LAN PC

Network

: 192.168.5.0

1. Setting Ip address deni#nano /etc/network/interfaces selanjutnya cari perintah ini : # The Loopback network Interface auto lo iface lo inet loopback
#The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.5.32 netmask 255.255.255.0 network 192.168.5.0 broadcast 192.168.5.255 gateway 192.168.5.254 dns-server 202.134.0.155 Lalu tambahkan : # secondary network interface allow-hotplug eth1 iface eth1 inet static address 192.168.50.1 netmask 255.255.255.0 network 192.168.50.0 broadcast 192.168.50.255 kemudian restart networknya:

deni#/etc/init.d/networking restart
kemudian restart komputernya:

deni#reboot
2 Configurasi SSH-server Install shh-server

deni#apt-get install ssh-server


lalu enter tekan y cara mengetest shh server

deni#ssh 192.168.50.1 enter ketik yes


3.Configurasi DNS server Install bind9

deni#apt-get install bind9


lalu enter tekan y

kemudian buat folder dan atur configurasi dengan cara :

deni#cp /etc/bind/db.local /etc/bind/db.deni1 deni#cp /etc/bind/db.127 /etc/bind/db.deni2 deni#cp /etc/bind/db.local /etc/bind/db.deni3 deni#cp /etc/bind/db.127 /etc/bind/db.deni4
lalu edit dengan cara :

kiki#nano /etc/bind/db.kiki1
lalu edit serperti di bawah ini :
$TTL @ 604800 IN SOA smkpertiwi.sch.id. root smkpertiwi.sch.id. { 2 ; serial 604800 ; refresh 86400 ; Retry 2419200 ; Expire 604800 ; Negative Cache TTL smkpertiwi.sch.id. 192.168.50.1 192.168.50.1 192.168.50.1

@ @ www ftp

IN IN IN IN

NS A A A

Lalu tekan ctrl X untuk save

deni#nano/etc/bind/db.deni2
lalu edit serperti di bawah ini :
$TTL @ 604800 IN SOA smkpertiwi.sch.id. root smkpertiwi.sch.id. { 1 ; serial 604800 ; refresh 86400 ; Retry 2419200 ; Expire 604800 ; Negative Cache TTL smkpertiwi.sch.id. ns.smkpertiwi.sch.id. www.smkpertiwi.sch.id. ftp.smkpertiwi.sch.id.

@ 20 20 20

IN IN IN IN

NS PTR PTR PTR

Lalu tekan ctrl X untuk save

deni#nano /etc/bind/db.deni3
lalu edit serperti di bawah ini :
$TTL @ 604800 IN SOA profilku.com. root profilku.com. { 2 ; serial 604800 ; refresh 86400 ; Retry

2419200 ; Expire 604800 ; Negative Cache TTL @ @ www ftp IN IN IN IN NS A A A profilku.com. 192.168.50.1 192.168.50.1 192.168.50.1

Lalu tekan ctrl X untuk save

deni#nano/etc/bind/db.deni4
lalu edit serperti di bawah ini :
$TTL @ 604800 IN SOA profilku.com. root profilku.com. { 2 ; serial 604800 ; refresh 86400 ; Retry 2419200 ; Expire 604800 ; Negative Cache TTL profilku.com. ns.profilku.com. www.profilku.com. ftp.profilku.com.

@ 20 20 20

IN IN IN IN

NS PTR PTR PTR

Lalu tekan ctrl X untuk save Kemudian masuk ke named.conf

deni#nano /etc/bind/nemed.conf

zone "localhsot" { type master; fle"/etc/bind/db.local"; };

zone "127.in-addr.arpa" { type master; file/etc/bind/db.127"; };

kemudian cari dan edit sebagai berikut :


zone"smkpertiwi.sch.id" { type master; file"/etc/bind/db.kiki1"; };

Cari dan copy file ke paling bawah sebelum Included..........

zone"profilku.com" { type master; file"/etc/bind/db.kiki3"; };

}; zone "2.168.192.in-addr.arpa" { type master; };

zone "localhsot" { type master; fle"/etc/bind/db.local";

file "/etc/bind/db.kiki2";

Lalu tekan ctrl X untuk save Lalu edit file resolv.conf

deni#nano /etc/resolv.conf

maka akan muncul searchdns www.smkpertiwi.sch.id hapus nameserver 202.134.0.155 ganti dengan ip 192.168.50.1 kemudian restart bind9 dengan

deni#/etc/init.d/bind9 restart
kemudian test dengan menggunakan

deni#nslookup smkpertiwi.sch.id deni#nslookup profilku.com deni#nslookup 192.168.50.xx


4. Configurasi Web server Install WEB server dengan cara :

deni#apt-get install apache2 php5 lynx mysql-server phpmyadmin


lalu copy file

deni#cp /etc/apache2/sites-enabled/000-default /etc/apache2/sites-enabled/smkpertiwi


buat direktori baru dengan cara :

deni#mkdir /home/smkpertiwi

deni#mkdir /home/smkpertiwi/profilku deni#mkdir /etc/skel/profilku


lalu copy file dengan

deni#cp /var/www/index.html /home/smkpertiwi/profilku


kemudian edit file yang telah di copy tadi dengan cara :

deni#nano /var/www/index.html
edit scrip yang ada restart apache2 dengan cara :

deni#/etc/init.d/apache2 restart
kemudian test dengan cara

deni#lynx smkpertiwi.sch.id deni#lynx profilku.com


5. Configurasi Proxy server

deni#apt-get install squid deni#rm /etc/squid/squid.conf deni#nano /etc/squid/squid.conf


ketikan pada halaman kosong sebagai berikut Tanda Merah yang di edit acl all src all acl localnet src 192.168.50.0/24 acl situs url_regex -i "/etc/squid/blokir.txt" http_access deny situs http_access allow localnet http_access allow all http_port 3128 transparent cache_mem 8 mb memory_replacement_policy heap GDSF cache_replacement_policy heap LFUDA store_dir_select_algorithm round-robin cache_dir aufs /cache 10000 24 256 cache_store_log none cache_access_log /var/log/squid/access.log cache_effective_user proxy cache_effective_group proxy cache_mgr admin@smkpertiwi.sch.id visible_hostname proxy.smkpertiwi.sch.id

deni #nano /etc/squid/blokir.txt


profilku.com

deni #mkdir /cache deni #chown R proxy:proxy /etc/squid/blokir.txt deni #chown R proxy:proxy /cache

deni deni deni deni

#/etc/init.d/squid stop #squid z #/etc/init.d/squid start #nano /etc/rc.local

iptables t nat A POSTROUTING o eth0 -j MASQUERADE iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 3128 exit 0

deni #/etc/init.d/squid restart


Restarting Squid HTTP proxy: squid Waiting.....................done. 12) Buka browser komp client dan buka http://profilku.com anda akan melihat tampilan ini:

Proses NAT

deni#nano /etc/sysctl.conf
cari dan hilangkan tanda pagar (#) pada tulisan

Selanjutnya save tekan CTRL X dan y

6 Configurasi FTP-server

deni#apt-get install proftpd

Run proftpd : dari inetd

deni#nano/etc/proftpd/proftpd.conf
#includes DSO modules Include/etc/proftpd/modules.conf #set off to disable Ipv6 support which is annoying on Ipv4 only boxes useIPv6 off #if set on you can experience a longer connection delay in many cases Ident lookups off Server name HN FTP server Server type inetd Dever welcome off

deni#/etc/init.d/proftpd restart
Stoping ftp server : proftpd Starting ftp server : proftpd buka komputer client brouser ftp://smkpertiwi.sch.id Nama pengguna Kata sandi : deni :130694

Kemudian akan proses login Selesai.......... Selamat mencoba ...

You might also like