LOG LATIHAN UJIKOM!!
-masukin IP buat semua interface
int set ether1 name=Internet
int set ether1 name=Client
int set ether1 name=Server
ether1:
ip dhcp-client add interface=ether1
ip dhcp-client enable number=0
ip dhcp-client renew 0
ether2:
ip address add interface=ether2 address=192.168.10.1 netmask=255.255.255.240
ether3:
ip address add interface-ether3 address=10.2.10.1 netmask 255.2555.255.252
-buat setting dhcp server
[admin@MikroTik] ip dhcp-server> setup
Select interface to run DHCP server on
dhcp server interface: ether2
Select network for DHCP addresses
dhcp address space: 192.168.28.0/28
Select gateway for given network
gateway for dhcp network: 192.168.10.1
Select pool of ip addresses given out by DHCP server
addresses to give out: 192.168.28.0-192.168.28.14
Select DNS servers
dns servers: 192.168.0.1 (ini langsung enter aja)
Select lease time
lease time: 3d
[admin@MikroTik] ip dhcp-server>
-buat setting NAT
ip firewall nat add chain=srcnat out-interface=ether(ke public) action=masquerade
JANGAN LUPA YANG SERVER KARENA STATIC MASUKIN DNS MANUAL.
-buat PAT
ip firewall nat add chain=dstnat dst-address=(ip yang ke internet) dst-port=80 protocol=tcp action=dst-nat to-addresses=10.2.28.2 to-ports=80
ip firewall nat add chain=dstnat src-address=(ip network client) protocol=tcp dst-port=80 action=redirect to-ports=8080
-buat block google.
ip firewall layer7-protocol add name=blockgoogle regexp=google.com
ip firewall layer7-protocol print
ip firewall layer7-protocol edit number=0
value-name=regexp
edit:
^.+(google.com).*$
ip firewall filter add layer7-protocol=blockgoogle chain=forward action=drop
-buat proxy (OPTIONAL BISA PAKE BISA ENGGA)
ip proxy set enabled=yes port=8080 src-address=[ip address yang ke wan]
ip proxy access add dst-host=www.google.com action=deny
-buat ddns
tool dns-update dns-server=(nanti dikasih) name=stevanus zone=ukk address=(ip router yg ke internet)
-buat owncloud
pake versi yang 6.0.2 kalo pake versi baru php gak support.
apt-get install apache2 mysql-server phpmyadmin php5
wget -O owncloud-6.0.2.tar.bz2 https://download.owncloud.org/community/owncloud-6.0.2.tar.bz2 --no-check-certificate
tar -xvf owncloud-6.0.2.tar.bz2
mv owncloud /var/www
chown www-data:www-data /var/www/owncloud
/etc/init.d/apache2 restart && /etc/init.d/mysql restart
BUAT DATABASE OWNCLOUD
mysql -u root -p
create database owncloud;
langsung buka localhost/owncloud abis itu config gui.
BUAT BISA MASUK OWNCLOUD LEWAT PAT. SETTING AJA LEWAT GUI ABIS ITU TINGGAL PILIH YES.
BUAT GANTI UPLOAD FILE MAKS
nano /etc/php5/apache2/php.ini
ganti string
upload_max dan post_max_size
-Buat DNS
install bind9
# cd /etc/bind
# cp named.conf.local named.conf.local.b
# nano named.conf.local
# nano named.conf.local
zone "10.ukk" {
type master;
file "/etc/bind/db.10.ukk";
};
zone "10.2.10.in-addr.arpa" {
type master;
file "/etc/bind/db.10";
};
copy file db.local jadi db.10.ukk
# nano db.10.ukk
$TTL 604800
@ IN SOA 10.ukk. root.10.ukk. (
1802201500 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
IN A 10.2.10.2
;
@ IN NS ns.10.ukk.
@ IN A 10.2.10.2
ns IN A 10.2.10.2
data IN CNAME ns
toyyibah IN CNAME ns
# cp db.127 db.10
# nano db.10
$TTL 604800
@ IN SOA 10.ukk. root.10.ukk. (
1802201500 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
;
@ IN NS ns.10.ukk.
2 IN PTR ns.10.ukk.
2 IN PTR data.10.ukk.
2 IN PTR toyyibah.10.ukk.
# service bind9 restart
# nano /etc/resolv.conf
# dig data.10.ukk
# dig toyyibah.10.ukk
# dig 10.ukk
# dig 10.2.10.2
# named-checkzone data.10.ukk /etc/bind/db.data.10.ukk
# named-checkzone reysa.10.ukk /etc/bind/db.data.10.ukk
# named-checkzone 10.ukk /etc/bind/db.data.10.ukk
# nslookup data.10.ukk
# nslookup toyyibah.10.ukk
# nslookup 10.2.10.2
-VirtualHost!
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/toyyibah
trus config
<VirtualHost *:80>
ServerName toyyibah.10.ukk
ServerAdmin webmaster@10.ukk
DocumentRoot /var/www
<Directory /var/www/>
</VirtualHost>
<VirtualHost *:80>
ServerName data.10.ukk
ServerAdmin webmaster@10.ukk
DocumentRoot /var/www/owncloud
DirectoryIndex index.php
</VirtualHost>
Tidak ada komentar:
Posting Komentar