SWITCH
Inernet
PC ROUTER
PC SERVER
PROXY
DNS
WEB
FTP
MAIL SERVER
KONFIGURASI DNS
#apt-get install bind9
#pico /etc/bind/named.conf.default-zones
zone "tkjnusantara.sch.id" {
type master;
file "/var/cache/bind/db.tkj";
};
zone "40.168.192.in-addr.arpa" {
type master;
file "/var/cache/bind/db.192";
};
#cp /etc/bind/db.local /var/cache/bind/db.tkj
#cp /etc/bind/db.127 /var/cache/bind/db.192
1
Administrasi Server
#pico /var/cache/bind/db.tkj
;
; BIND data file for local loopback interface
;
$TTL 604800
@
IN
SOA tkjnusantara.sch.id. root.tkjnusantara.sch.id. (
2
; Serial
604800
; Refresh
86400
; Retry
2419200
; Expire
604800 )
; Negative Cache TTL
;
@
IN
NS
tkjnusantara.sch.id.
@
IN
A
192.168.40.XX
www IN
A
192.168.40.XX
ftp
IN
A
192.168.40.XX
mail IN
A
192.168.40.XX
#pico /var/cache/bind/db.192
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@
IN
SOA tkjnusantara.sch.id. root.tkjnusantara.sch.id. (
1
; Serial
604800
; Refresh
86400
; Retry
2419200
; Expire
604800 )
; Negative Cache TTL
;
@
IN
NS
tkjnusantara.sch.id.
XX
IN
PTR tkjnusantara.sch.id.
#/etc/init.d/bind9 restart
KONFIGURASI WEBSERVER
#apt-get ins tall apache2 php5
#pico /var/www/index.html
<html><body><h1>tkjnusantara.sch.id</h1></body></html>
#/etc/init.d/apache2 restart
Administrasi Server
ServerName tkjnusantara.sch.id
DocumentRoot /var/www
</VirtualHost>
#/etc/init.d/apache2 restart
KONFIGURASI FTP
#apt-cdrom add
#apt-get update
#apt-get install proftpd
#mkdir /home/nusantara
#chmod 777 /home/nusantara -R
#useradd d /home/nusantara nusantara
#passwd nusantara
#mkdir /home/tkjsmk
#useradd d /home/tkjsmk
#passwd tkjsmk
#pico /etc/proftpd/proftpd.conf
DefaultRoot
~
#/etc/init.d/proftpd restart
Apt-get purge bind9
Cd /var/bind enter
Rm r db.tkj db.192
Administrasi Server
#adduser dinu
#pico /etc/postfix/main.cf
home_mailbox = Maildir/
#dpkg-reconfigure postfix
Internet site = tkjnusantara.sch.id
Root and postmaster mail recipient:
<ok>
Other destinations to accept mail for (blank for none):
Force synchronous updates on mail queue?
<tidak>
Local networks: 0.0.0.0/0
<ok>
Use procmail for local delivery?
<tidak>
Mailbox size limit (bytes): 0
<ok>
Local address extension character: +
<ok>
Internet protocols to use: ipv4
#/etc/init.d/postfix restart
#telnet tkjnusantara.sch.id 25
mail from: dani
rcpt to: anit
data
hallo
.
Quit
<ok>
KONFIGURASI WEBMAIL
#apt-get install squirrelmail
#pico /etc/squirrelmail/apache.conf
<VirtualHost *:80>
DocumentRoot /usr/share/squirrelmail
ServerName tkjnusantara.sch.id
</VirtualHost>
<VirtualHost 192.168.40.XX>
DocumentRoot /usr/share/squirrelmail
ServerName tkjnusantara.sch.id
</VirtualHost>
#pico /etc/apache2/apache2.conf
Include "/etc/squirrelmail/apache.conf"
#/etc/init.d/apache2 restart
KONFIGURASI HTTPS
#openssl req -new -x509 -days 365 -nodes -out /etc/apache2/apache.pe
-keyout /etc/apache2/apache.pem
#a2enmod ssl
4
Administrasi Server
#pico /etc/apache2/sites-available/default
<VirtualHost *:443>
ServerName tkjnusantara.sch.id
DocumentRoot /var/www
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
#/etc/init.d/apache2 restart
Administrasi Server
KONFIGURASI NTP
6
Administrasi Server
KONFIGURASI DHCP
#apt-get install isc-dhcp-server
#pico /etc/dhcp/dhcpd.conf
subnet 192.168.40.0 netmask 255.255.255.240 {
range 192.168.40.XX 192.168.40.XX;
option domain-name-servers 192.168.40.XX, 8.8.8.8;
option domain-name "tkjnusantara.sch.id";
option routers 192.168.30.10;
option broadcast-address 192.168.40.255;
default-lease-time 600;
max-lease-time 7200;
}
#pico /etc/default/isc-dhcp-server
INTERFACES="eth0"
#/etc/init.d/isc-dhcp-server restart
KONFIGURASI ROUTING
#pico /etc/sysctl.conf
net.ipv4.ip_forward=1
# iptables t nat A POSTROUTING o eth0 j MASQUERADE
KONFIGURASI FIREWALL
1. NAT
iptables t nat A POSTROUTING o eth0 j MASQUERADE
2. REDIRECT PORT
iptables t nat A PREROUTING i eth1 p tcp --dport 80 j REDIRECT --toports 3128
Administrasi Server