Setting Router
a. ifconfig |less atau ifconfig -a
b. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
c. iptables-save > /etc/network/iptables.conf
d. echo "iptables-restore < /etc/network/iptables.conf" >> /etc/network/if-up.d/iptables
e. chmod +x /etc/network/if-up.d/iptables
f. pico /etc/network/if-up.d/iptables
#!/bin/sh [ditambahkan]
iptables-restore < /etc/network/iptables.conf
g. pico /etc/sysctl.conf net.ipv4.ip_forward=1 [tanda # dihilangkan]
h. reboot
Setting DNS
1. apt-get install bind9
2. cd /etc/bind
3. bind# pico named.conf.local
zone "01smkn1klaten.sch.id" {
type master;
file "/etc/bind/db.01smkn1klaten";
};
zone "0.16.172.in-addr.arpa" {
type master;
file "/etc/bind/db.172.16.0";
};
zone "01tkj.01smkn1klaten.sch.id" {
type master;
file "/etc/bind/db.01tkj";
};
4. cp db.local db.01smkn1klaten
5. cp db.127 db.172.16.0
6. pico db.01smkn1klaten
@ IN SOA ns01.01smkn1klaten.sch.id. arumia.01smkn1klaten.sch.id.
@ IN NS ns01.01smkn1klaten.sch.id.
@ IN A 172.16.0.62
ns01 IN A 172.16.0.62
www IN CNAME ns01.01smkn1klaten.sch.id.
7. pico db.172.16.0
@ IN SOA ns01.01smkn1klaten.sch.id. arumia.01smkn1klaten.sch.id.
@ IN NS ns01.01smkn1klaten.sch.id.
@ IN PTR ns01.01smkn1klaten.sch.id.
@ IN PTR 01tkj.01smkn1klaten.sch.id.
8. cp db.01smkn1klaten db.01tkj
9. pico db.01tkj [ns01 diganti 01tkj]
@ IN SOA 01tkj.01smkn1klaten.sch.id. arumia.01smkn1klaten.sch.id.
@ IN NS 01tkj.01smkn1klaten.sch.id.
@ IN A 172.16.0.62
01tkj IN A 172.16.0.62
www IN CNAME 01tkj.01smkn1klaten.sch.id.
10. pico named.conf.options
[tanda // dihilangkan] forwarders { 192.168.1.62; 117.103.173.140; 117.103.173.129; };
allow-query { any; }; [ditambahkan]
auth-nxdomain no; #conform to RFC1035
listen-on-v6 { any; }; };
11. /etc/init.d/bind9 restart
12. pico /etc/resolv.conf
search 01smkn1klaten.sch.id
nameserver 127.0.0.1 [ditambahkan]
nameserver 192.168.1.62
nameserver 117.103.173.140 [ditambahkan]
nameserver 117.103.173.129 [ditambahkan]
13. set ip client ip address 172.16.0.8 netmask 255.255.255.192 gateway 172.16.0.62 dns 172.16.0.62
14. nslookup www.01smkn1klaten.sch.id
15. nslookup 01tkj.01smkn1klaten.sch.id
16. coba ping lewat client pada command prompt 192.168.5.1 192.168.0.62 192.168.1.62 127.16.0.62 jika ingin memakai putty: buka putty dengan ip 172.16.0.62 port 22
KONFIGURASI WEB SERVER
1. apt-get install apache2 php5
2. cd /home/arumia
3. arumia# mkdir smkn1klaten
4. arumia# mkdir tkj
5. arumia# cd smkn1klaten
6. smkn1klaten# pico index.html
#
UJI KOMPETENSI SMKN 1 KLATEN TAHUN 2009-2010 NAMA : ARUMIA DWIJAYANTI NO : 01 KELAS : XII TKJ2 |
#
Tanda # dihilangkan ya... cuz ni wat contoh biar tau textna
8. smkn1klaten# cp index.html ../tkj
9. smkn1klaten# cd ../tkj
10. tkj# pico index.html
sama dengan di direktori smkn1klaten tapi kalo mau di modif silahkan....
11. tkj# cd /etc/apache2/sites-available
12. sites-available# cp default default-asli
13. sites-available# pico default
## 01smkn1klaten.sch.id
*
DocumentRoot /home/arumia/smkn1klaten
ServerName www.01smkn1klaten.sch.id
ServerAlias 01smkn1klaten.sch.id
*
*
DocumentRoot /home/arumia/tkj
ServerName 01tkj.01smkn1klaten.sch.id
ServerAlias 01tkj.01smkn1klaten.sch.id
*
tanda * didepan Virtual Host dihilangkan
15. /etc/init.d/apache2 restart
16. buka winscp dengan ip 192.168.5.1
login root, password ***
drag & drop logosmk.jpg lalu copy pada /home/arumia/smkn1klaten
drag & drop xxx.jpg lalu copy pada /home/arumia/tkj
17. coba pada browser :
www.01smkn1klaten.sch.id
01tkj.01smkn1klaten.sch.id
setting dhcp server
1. apt-get install dhcp3-server [2x install]
2. cd /etc/dhcp3
3. dhcp3# pico dhcpd.conf
#option definitions common to all suported network
option domain-name "01smkn1klaten.sch.id";
option domain-name-servers ns01.01smkn1klaten.sch.id;
authoritative;
# A slightly different configuration for an internal subnet
subnet 172.16.0.0 netmask 255.255.255.192 {
range 172.16.0.1 172.16.0.61;
optin domain-name-servers ns01.01smkn1klaten.sch.id;
option domain-name "01smkn1klaten.sch.id";
option routers 172.16.0.62;
option broadcast-address 172.16.0.63;
default-lease-time 600;
max-lease-time 7200;
}
[tanda # dihilangkan]
4. /etc/init.d/dhcp3-server restart [2x restart]