Debian/GNU Linux adalah salah satu distro sistem operasi Linux yang 100 % free / non komersial yang dikembangkan oleh developer linux tanpa terikat perusahaan. Sampai saat ini, rilis terakhir adalah Debian 4.0 dengan kode nama “Etch”,
Persiapan instalasi
Sebelum memulai instalasi, ada baiknya kita mempersiapkan skenario. Yaitu meliputi ip address, gateway, DNS, nama domain, dll serta paket instalasi yang akan digunakan tergantung kebutuhan dan layanan yang nantinya akan diberikan server seperti DHCP, NAT, Proxy Server, DNS Server lokal, dll.
IP address : 192.168.17.3 ( eth0 ), 192.168.3.254 ( eth1 )
Gateway : 192.168.17.1
DNS : 202.134.0.61
Domain : tkj.local
1. Instalasi
* Partisi
/boot 300MB primary ext3 BOOTABLE=ON
/ 300MB primary/logical ext3
swap 512MB ( atau 2x ukuran RAM ) primary/logical swap area
/home 2000MB primary/logical ext3
* Paket
mc ( file manager linux ), dhcp ( dhcp server ), bind ( dns server ), squid ( proxy server )
command untuk install : apt-get install ( nama paket )
ex: apt-get install mc
2. Konfigurasi
* IP Address
- Edit file konfigurasi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.17.3
netmask 255.255.255.0
network 192.168.17.0
broadcast 192.168.17.255
gateway 192.168.17.1
dns-name-servers 192.168.17.1
dns-search tkj.local
auto eth1
iface eth1 inet static
address 192.168.3.254
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
* DHCP Server
- Edit file konfigurasi /etc/dhcp.conf
default-lease-time 21600;
max-lease-time 43200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.3.255;
option routers 192.168.3.254;
option domain-name-servers 192.168.3.254,192.168.17.1;
option domain-name “tkj.local”;
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.1 192.168.10.253;
};
- Set ethernet yang akan menyebarkan IP Address di /etc/default/dhcp
isikan “eth1″
* NAT ( Network Address Translation )
- NAT untuk masquerade ( menyamarkan ) jaringan lokal agar bisa terkoneksi ke internet
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#iptables-save > /etc/firewall.conf ( menyimpan konfigurasi di /etc/firewall.conf )
- NAT untuk redirect ( mengarahkan ) port 80 ( web ) ke port 8080 ( proxy ), konfigurasi ini digunakan untuk kepentingan proxy server. Dimana nanti, tiap client yang akan mengakses web diarahkan terlebih dahulu ke proxy server
#iptables –t nat –A PREROUTING –i ethi –p tcp –dport 80 \
-d !192.168.17.0/24 –j REDIRECT –to-port 8080
#iptables-save > /etc/firewall.conf
* Proxy Server
- File konfigurasi /etc/squid/squid.conf
http_port 8080 transparent
cache_mem 10 MB cache_effective_user squid
http_access allow localhost
http_access allow all
http_reply_access allow all
* DNS Server
- Edit file konfigurasi /etc/bind/named.conf, tambahkan di alinea paling bawah :
zone “tkj.local” {
type master;
file “/var/cache/bind/db.tkj”;
};
zone “192.in-addr.arpa” {
type master;
file “/var/cache/bind/db.192?;
};
- Buat file db.tkj di /var/cache/bind/, isikan dengan :
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA tkj.local. root.tkj.local. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS tkj.local.
@ IN A 192.168.3.254
- Buat file db.192 di /var/cache/bind/, isikan dengan :
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA tkj.local. root.tkj.local. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS tkj.local.
1.1.168 IN PTR tkj.local.
0 Response to "Konfigurasi Debian Server"
Posting Komentar