Senin, Desember 01, 2014

KONFIGURASI PROXY SQUID PADA DEBIAN 7.0


 #nano /etc/network/interfaces

auto eth0
iface eth0 inet static
address  192.168.20.4
netmask 255.255.255.0
gateway 192.168.20.1
auto eth1
iface eth1 inet static
address  11.12.13.1
netmask 255.255.255.240

Ctrl+X -->y
# /etc/init.d/networking restart
#nano /etc/resolv.conf
            nameserver 192.168.20.1
            nameserver 8.8.8.8


Ctrl+X -->y
#nano/etc/rc.local
            iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
            iptables –t nat –A PREROUTING –s 11.12.13.0/28  –p tcp --dport 80 –j REDIRECT 
            --to-port 3128
           (Tulis di atas tulisan “exit 0”)
#nano /etc/sysctl.conf
           (cari tulisan) #netIpv4 Forward=1 --> hapus tanda # pada depan tulisan tersebut
#reboot
          - Selanjutnya instalasi squid (dari CD)
#apt-cdrom add
#apt-get –y install squid
#cd /etc/squid
nano squid.conf
               Ctrl+w --> ketik http_port 3128                  
                              Tambahkan transparent setelah http_port 3128
                Ctrl+w --> ketik insert your
                              (tulis dibawah insert your)
                              acl jaringan src 11.12.13.0/28
                              http_access allow jaringan
                   Ctrl+w --> ketik acl connect
                              acl blok dstdomain “/etc/squid/situs.txt
                              http_access deny blok
            Ctrl+w --> ketik cache_mgr
                             (hapus tanda # dari tulisan webmaster + hapus tulisan webmaster)
                             cache_mgr ayubwahyudin@gmail.com
                             visible_hostname www.gmail.com
                  Ctrl X-->y

 nano situs.txt
                            www.kompas.com (situs yang akan di blok)

                             Ctrl X
-->y
#/etc/init.d/squid restart
#reboot

0 komentar:

Posting Komentar

Ayub Wahyudin. Diberdayakan oleh Blogger.

Label