Minggu, 01 Agustus 2010

Server Debian

“Setting DNS Server”
- Install paket bind9
#apt-get install bind9
- Kopi file db.local(forward) dan db.255(reverse)-
dari /etc/bind/ ke folder /var/cache/bind/…
#cp –a /etc/bind/db.local /var/cache/bind/forward
#cp –a /etc/bind/db.local /var/cache/bind/reverse
- Konfigurasi file forward.
#nano /var/cache/bind/forward
@ IN SOA manux.crot.root.manux.crot. (
--------------------------
--------------------------
@ IN NS manux.crot.
@ IN A 192.168.1.1
IN MX 10 mail.manux.crot.
ns IN CNAME @
ftp IN CNAME @
www IN CNAME @
web IN CNAME @
mail IN CNAME @
ctrl + x untuk menyimpan konfigurasi =>y (enter)

- Konfigurasi file reverse
#nano /var/cache/bind/reverse

@ IN SOA manux.crot.root.manux.crot. (
--------------------------
--------------------------
@ IN NS manux.crot.
1 IN PTR manux.crot.
1 IN PTR debian.coy.
1 IN PTR redhat.bro.
1 IN PTR opensuse.man.


Domain secondary
ctrl + x untuk menyimpan konfigurasi =>y (enter)
- Konfigurasi file named.conf
#nano /etc/bind/named.conf

};
zone “manux.crot” {
type master;
file “forward”;
};
zone “1.168.192.in-addr.arpa”{
type master;
file “reverse”;
};
zone “debian.crot” {
type master;
file “forward”;
};
zone “redhat.bro” {
type master;
file “forward”;
};
zone “opensuse.man” {
type master;
file “forward”;
};
ctrl + x untuk menyimpan konfigurasi =>y (enter)
- restart konfigurasi DNS dengan perintah
#/etc/init.d/bing9 restart
-test konfigurasi dengan perintah
#nslookup manux.crot
#nslookup 192.168.1.1

Debian 4.0 Etch Configuration


“Setting DHCP Server”
- Install paket dhcp3-server
#apt-get install dhcpd.conf
Konfigurasi file dhcpd.conf
#nano /etc/dhcp3/dhcpd.conf

Subnet 192.168.1.0 netmask 255.255.255.0 {
Range 192.168.1.5 192.168.1.254
Option domain-name-servers 192.168.1.1;
Option router 192.168.1.1;
Broadcast 192.168.1.255;
Min- 600;
Max- 7200;
}

ctrl + x untuk menyimpan konfigurasi =>y (enter)
restart konfigurasi dhcp server
#/etc/init.d/dhcp3-server restart

“Setting WEB Server”
- Install paket apache2 dan links
#apt-get install apache links
#nano /var/www/apache2/index.html
Or
Buat folder baru dimana saja,
Ex: mkdir /etc/apache2/web
Buat file.php
#nano /etc/apache2/web/file.php

ctrl + x untuk menyimpan konfigurasi =>y (enter)


”Setting Proxy Server”
- install paket squid
#apt-get install squid
- konfigurasi file squid.conf
#nano /etc/squid/squid.conf

http_port 3128 transparent
cache_mem 8 mb
cache_dir ufs /var/spool/….
-ketikan di bawah acl CONNECT
acl lan src 192.168.1.0/24
acl site url_regex –i “/etc/file.txt”
http_access deny site
http_access allow lan
- edit file.txt
#nano /etc/file.txt
naon web yang akan di blockir
he
bf
ctrl + x untuk menyimpan konfigurasi =>y (enter)
#echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables –t nat –A PREROUTING –I eth0 –p tcp --dport 80 –j REDIRECT --to-port 3128
- masukan perintah iptables ke dalam file rc.local agar ketika di restart konfigurasi iptablesnya tidak hilang.
#nano /etc/rc.local
- Ketikan dipaling bawah sebelum tanda exit

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –t nat –A PREROUTING –I eth0 –p tcp --dport 80 –j REDIRECT --to-port 3128
- restart konfigurasi squid
#/etc/init.d/squid restart
“Setting Mail Server & WEB Mail Server”
- Install paket postfix courier-imap courier-pop squirrelmail
#apt-get install postfix courier-imap courier-pop squirrelmail
- Konfigurasi postfix file main.cf
#nano /etc/postfix/main.cf

myhostname = mail.manux.crot
mydomainname = manux.crot
mynetworks = 192.168.1.0/24
#mailbox-commend = procmail $EXTENTION$
inet_interfaces = all
home_mailbox = Maildir/

ctrl + x untuk menyimpan konfigurasi =>y (enter)
- buat folder mailbox di /etc/skel
#cd /etc/skel Maildir,M’y hrs kapital
#maildirmake Maildir
#cd /
- konfigurasi web mail (squirrelmail)
#squirrelmail-configure

2 = server setting
1 = manux.crot
a = setting SMTP
4 = 192.168.1.1 (localhost)
8 = courier (software MTA)
b =
4 = 192.168.1.1 (localhost)
s = save
r = back to main menu
d = courier
s = save
q = quit

- Buat aliasis untuk mail server dengan cara edit file default
#nano /etc/apache2/site-avaulable/default

Alias /webmail “/usr/share/squirrelmail/”
---------------------
---------------------
---------------------
Untuk subdomain edit di paling bawah

#untuk mail server

ServerAdmin zen@manux.crot
DocumentRoot /usr/share/squirrelmail/
ServerName mail.manux.crot

#untuk web server support php

ServerAdmin zen@manux.crot
DocumentRoot /etc/apache2/web/
ServerName web.manux.crot


ctrl + x untuk menyimpan konfigurasi =>y (enter)
- restart konfigurasi mail server berserta web mail-nya.
#/etc/init.d/postfix restart
#/etc/init.d/courier-pop restart
#/etc/init.d/courier-imap restart
#/etc/init.d/courier-aut.. restart

Atau di Reboot…
#reboot
Selamat Mencoba….

 
Administrator : Hikmawan Kurniawan