install ini dulu ...
[sourcecode language="css"]
apt-get update
apt-get install squid squidclient squid-cgi
apt-get install ccze
apt-get install libzip-dev
apt-get install make1.9
apt-get install build-essential
apt-get install sharutils
apt-get install gcc
apt-get install squid squidclient squid-cgi ccze libzip-dev make1.9 build-essential sharutils gcc
[/sourcecode]
download squid 2.7 stable 9
[sourcecode language="css"]
wget http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE9.tar.gz
[/sourcecode]
extract filenya
[sourcecode language="css"]
tar zxvf squid-2.7.STABLE9.tar.gz
[/sourcecode]
masuk folder squid dan compile =>
[sourcecode language="css"]
./configure --prefix=/usr --exec_prefix=/usr --bindir=/usr/sbin --sbindir=/usr/sbin --libexecdir=/usr/lib/squid --sysconfdir=/etc/squid \ --localstatedir=/var/spool/squid --datadir=/usr/share/squid --enable-async-io=24 --with-aufs-threads=24 --with-pthreads --enable-storeio=aufs \ --enable-linux-netfilter --enable-arp-acl --enable-epoll --enable-removal-policies=heap,lru --with-aio --with-dl --enable-snmp \ --enable-delay-pools --enable-htcp --enable-cache-digests --disable-unlinkd --enable-large-cache-files --with-large-files \ --enable-err-languages=English --enable-default-err-language=English --with-maxfd=65536
[/sourcecode]
dalam folder squid => make
dalam folder squid => make install
backup file original =>
mv /etc/squid/squid.conf /etc/squid/squid.conf.backup
mv /etc/sysctl.conf /etc/sysctl.conf.backup
salin file config =>
cd /etc/squid
wget http://anwar-server.googlecode.com/files/storeurl.pl
wget http://anwar-server.googlecode.com/files/squid.conf
cd /etc
wget http://anwar-server.googlecode.com/files/sysctl.conf
file permission =>
chown proxy:proxy /cache
chown proxy:proxy /etc/squid/storeurl.pl
chown proxy:proxy /var/log/squid/access.log
chown proxy:proxy /var/log/squid/cache.log
chmod 777 /etc/squid/storeurl.pl
chmod 777 /cache
buka file dan edit file squid.conf =>
nano /etc/squid/squid.conf
dan edit baris ini =>
[sourcecode language="css"]
cache_dir aufs /cache 7000 16 256 (untuk angka sesuai dengan ukuran dan partisi cache anda)
acl localnet src 192.168.1.0/24 (sesuaikan dengan blok IP warnet anda yang akan akses proxy)
############################################################################
acl youtube_range url_regex -i .*youtube\.com\/videoplayback.*range\=.*$
acl youtube_range url_regex -i .s.youtube\.com
acl youtube_range url_regex -i .s2.youtube\.com
http_access deny youtube_range
#############################################################################
[/sourcecode]
buat file store.log =>
vi /var/spool/squid/logs/store.log
chown proxy:proxy /var/spool/squid/logs/store.log
chmod 777 /var/spool/squid/logs/store.log
cek konfigurasi squid =>
squid -k parse
stop squid service =>
/etc/init.d/squid stop
Jika tidak ada error lanjut =>
squid -f /etc/squid/squid.conf -z
biar bisa eksekusi squid =>
chmod +x /etc/init.d/squid
start squid =>
service squid start
set aktif saat boot =>
update-rc.d squid defaults
Reboot Ubuntu =>
init 6
SETINGAN DI ROUTER MIKROTIK
LALU SETING DI IP >FIREWALL>NAT
ip server proxy : 192.168.1.10IP lan di router router : 192.168.1.1
[sourcecode language="css"]
/ip firewall nat
add chain=dstnat action=dst-nat to-addresses=192.168.1.0 to-ports=3128 protocol=tcp src-address=192.168.1.0/24 dst-port=80
add chain=srcnat action=masquerade to-addresses=0.0.0.0 src-address=192.168.1.0/24
[/sourcecode]
gambarnya :
Membuat Proxy server Caching
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar