Thursday, September 26, 2013

Membangun Server Linux ( DNS , FTP, WEB SERVER dan PROXY SERVER )

nano /etc/apt/sources.list

deb http://kambing.ui.ac.id/ubuntu/ oneiric main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ oneiric-security main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ oneiric-backports main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ oneiric-proposed main restricted universe multiverse


* nano named.conf.options

  forwarders {
                199.199.199.1;
         };

* nano named.conf.local

zone "sekolah.sch.id"{
type master;
file "/etc/bind/sekolah";
};

zone "institusi.com"{
type master;
file "/etc/bind/sekolah";
};

zone "199.199.199.in-addr.arpa"{
type master;
file "/etc/bind/ipgue";
};

* nano sekolah

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     sekolah.sch.id. root.sekolah.sch.id. (
                                   2         ; Serial
                         604800         ; Refresh
                           86400         ; Retry
                       2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
sekolah.sch.id.                    IN      NS      ns.sekolah.sch.id.
institusi.com.                       IN      NS      ns.institusi.com.
ns                                       IN      A       199.199.199.127
www.sekolah.sch.id.           IN      A       199.199.199.127
www.institusi.com.              IN      A       199.199.199.127
ftp.sekolah.sch.id.               IN      A       199.199.199.127


* nano ipgue

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     sekolah.sch.id. root.sekolah.sch.id. (
                                   1         ; Serial
                         604800         ; Refresh
                           86400         ; Retry
                       2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
                        IN      NS      ns.sekolah.sch.id.
                        IN      PTR     www.sekolah.sch.id.
                        IN      PTR     www.institusi.com.
                        IN      PTR     ftp.sekolah.sch.id.

* nano /etc/resolv.conf

search sekolah.sch.id
nameserver 199.199.199.127

* /etc/init.d/bind9 restart


* apt-get install proftpd


* nano /etc/proftpd/proftpd.conf

UseIPv6                         off

ServerName                      "ftp.sekolah.sch.id"

( merubah di rectory = # DefaultRoot                   ~ ( /home ) )

* /etc/init.d/proftpd restart

*apt-get install apache2

*cd /etc/apache2/sites-available/

*cp default www.sekolah.sch.id

* nano www.sekolah.sch.id

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName www.sekolah.sch.id
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>


*a2ensite www.sekolah.sch.id

*/etc/init.d/apache2 restart

*apt-get install squid -y

*rm /etc/squid/squid.conf

*nano /etc/squid/squid.conf

acl all src all
acl localnet src 199.199.199.0/24
acl situs url_regex -i "/etc/squid/blokir.txt"
http_access deny situs
http_access allow localnet
http_access allow all
http_port 3128 transparent
cache_access_log /var/log/squid/access.log
deny_info proxysekolah.html situs
 
cache_mem 100 mb
memory_replacement_policy heap GDS
cache_replacement_policy heap LFUDA
store_dir_select_algorithm round-robin
cache_dir aufs /cache 10000 24 256
cache_store_log none
cache_effective_user proxy
cache_effective_group proxy
visible_hostname proxy.admin.hasantkj.net
cache_mgr Muhammad_Tajudin_Hasan



*nano /etc/squid/blokir.txt

www.institusi.com

*mkdir /cache

*chown -R proxy:proxy /etc/squid/blokir.txt

*chown -R proxy:proxy /cache/

*/etc/init.d/squid stop

*squid -z

*/etc/init.d/squid start

*iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 3128

*iptables-save > /etc/squid/hasan

* nano /etc/init.d/rc.local

iptables-restore < /etc/squid/hasan

*/etc/init.d/squid restart

tail -f /var/log/squid/access.log


editor SQUID

http://www.4shared.com/office/-qpH_oc-/new_script_proxy.html

editor WEB

http://www.4shared.com/office/sMrmBdnf/new_script_web.html








No comments:

Post a Comment