IKLAN

Pelatihan
&
Jasa Setting Proxy High Perfomance

Di Jamin Youtube tercache & Game online terupdate cepat
  • Pelatihan & Setting On the site
Mobile Phone:085868788968
Pin BB:52595EA2
BUTUH MOBIL BARU/BEKAS?

DP minimal 30 % dari harga mobil baru atau bekas. Syarat untuk karyawan/pns: Fotokopi KTP pemohon, Kartu Keluarga, Rincian Gaji, Rekening Listrik, Surat/Akta nikah, Telepon, PDAM, PBB, Rekening Tabungan & NPWP
Syarat untuk wiraswata:Plus SIUP/TDP, Laporan keuangan terakhir
Contact Person : Eka (082227594993)
Pin BB : 52595EA2

Jasa Pembuatan RT RW Net dan Warnet

Modal Hanya 5 JT-an..!!!

Meliputi:

=>Radio Access Point TP-LINK

=>Antena OMNI

=>Pigtail

=>Kabel UTP 25 meter

=>CPU P3 Mikrotik 2nd, CPU Dual COre Proxy Server 2nd dan Tower 3 Pipa Galvanis

Keuntungan

=>Lebih Murah dalam 1 paket komplit

=>RT/RW-Net Siap Pakai

=>PJK akan membantu promosi

Call/SMS = 085868788968
Pin BB :52595EA2


SEWA MOBIL PEKALONGAN DAN BATANG
Sewa/Carter Mobil Dalam Kota / Luar Kota (Se-Jawa) + Sopir.
Hubungi: Eka HP: 085868788968 / 082227594993
Pin BB : 52595EA2
Alamat:
Jl. Akasia Raya No.5 Perumahan Kalisalak Batang
Jl. Trapesium 3 No.15 Perumahan Limas Indah Pekalongan


SPACE INI DI SEWAKAN UNTUK IKLAN

Hubungi :

Mobile Phone:085868788968
Pin BB:52595EA2




Popular Posts

Home » » Install Proxy Server with Lusca for Debian Lenny

Install Proxy Server with Lusca for Debian Lenny

I just reinstall my proxy server after crash due to unable to boot. Kernel panic is the problem but not sure why this problem happens. To minimize downtime and prevent complaint from clients due to low speed of access, So I just reinstall the server with my favorite Linux distro, Debian, and for now I use Debian Lenny.

I use manual partition when the installation step ask me to use ‘guided’ or ‘manual’. The manual partition for my SATA HDD 80Gb is very simple. I just use 3 partition, 1 partition with 10Gb size as the root with mount point /, then 1 partition with 78Gb size as the cache for the proxy then put manual mount point to /cache, then the rest for swap area. For detail, I just put below the result command fdisk -l

proxy:~# fdisk -l

Disk /dev/sda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f800000

Device Boot Start End Blocks Id System
/dev/sda1 1 1216 9767488+ 83 Linux
/dev/sda2 1217 9484 66412710 83 Linux
/dev/sda4 9485 9733 2000092+ 5 Extended
/dev/sda5 9485 9733 2000061 82 Linux swap / Solaris

Then if we run comman df -l, will shows up the HDD configuration like below,

proxy:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.2G 598M 8.2G 7% /
tmpfs 506M 0 506M 0% /lib/init/rw
udev 10M 68K 10M 1% /dev
tmpfs 506M 0 506M 0% /dev/shm
/dev/sda2 64G 322M 64G 1% /cache

For the proxy server, I’m using LUSCA Web/proxy cache project. According to the Lusca website, Lusca is a fork of the Squid-2 development tree. The Lusca project aims to fix the shortcomings in the Squid-2 codebase whilst maintaining the the Squid-2 functionality and stability. This project provides existing Squid-2 users with a migration path to an actively developed codebase and new users with a stable, predictable software product to deploy.

So, after Debian Lenny installation finish, please download the Lusca packet that will use for the proxy server. I choose Lusca 14461, download the packet directly to your proxy server.

proxy:~# wget http://squid-proxy-pkg.googlecode.com/files/lusca_r14461_i386.tar.bz2

as default, Debian Lenny did not install bunzip2 packet to extract the bz2 file like above, so just apt-get the packet to install to the system proxy server

proxy:~# apt-get install bunzip2

then after completed, we could extract the bzz file of lusca above,

proxy:~# tar -xjvf lusca_r14461_i386.tar.bz2

and now we have directory lusca as the result from tar command above,

proxy:~# ls
lusca_r14461_i386

Enter to lusca directory then we will see some files and directory

proxy:~# cd lusca*
proxy:~/lusca_r14461_i386# ls
config core lusca-common_r14461_all.deb lusca_r14461_i386.deb squid-cgi_r14461_i386.deb squidclient_r14461_i386.deb

and now we start to install the lusca,

proxy:~# dpkg -i lusca-common* lusca_r14461*

if you got problem squid -z after installing the bot file above just ignore, because we need to modify the squid.conf to adapt with our lusca proxyserver configuration. Just copy the file under config directory on lusca directory.

proxy:~/lusca_r14461_i386# ls
config core lusca-common_r14461_all.deb lusca_r14461_i386.deb squid-cgi_r14461_i386.deb squidclient_r14461_i386.deb
proxy:~/lusca_r14461_i386# cd config
proxy:~/lusca_r14461_i386/config# ls
squid.conf storeurl-ubuntu.pl tunning-ubuntu.conf

copy the squid.conf, storeurl-ubuntu.pl, and tunning-ubuntu.conf to /etc/squid/ then modify the squid.conf to match with your requirement. Then don’t forget to chmod storeurl-ubuntu.pl to become execution script file. Here we go the step by step.

proxy:~/lusca_r14461_i386/config# cp *.* /etc/squid/
proxy:~/lusca_r14461_i386/config# cd /etc/squid/
proxy:/etc/squid# ls
squid.conf storeurl-ubuntu.pl tunning-ubuntu.conf
proxy:/etc/squid#vim squid.conf

then you need to edit the file to fit with yours,

##start of config
http_port 3128 transparent
icp_port 0
#icp_port 3130

pid_filename /var/run/squid.pid
cache_effective_user proxy
cache_effective_group proxy
#error_directory /usr/share/squid/errors/templates
#icon_directory /usr/share/squid/icons
visible_hostname proxy.janusmedia.net
cache_mgr admin@janusmedia.net
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
logfile_rotate 1
shutdown_lifetime 10 seconds

####################################################################
# Allow local network(s) on interface(s)
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl hotspot src 192.168.1.0/24 # RFC1918 possible internal network
acl lan src 10.1.1.0/24 # RFC1918 possible internal network
acl proxy src 192.168.2.0/24 # RFC1918 possible internal network
####################################################################

uri_whitespace strip
dns_nameservers 127.0.0.1 8.8.8.8 8.8.4.4 203.130.193.74
dns_testnames 127.0.0.1

cache_mem 8 MB
maximum_object_size_in_memory 16 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

cache_dir aufs /cache 45768 64 256 max-size=65536

minimum_object_size 512 bytes
maximum_object_size 128000 KB
offline_mode off
cache_swap_low 98
cache_swap_high 99

# No redirector configured

# Setup some default acls
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
#acl dynamic urlpath_regex cgi-bin ?

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports

# Always allow localhost connections
http_access allow localhost

# Allow local network(s) on interface(s)
http_access allow hotspot
http_access allow lan
http_access allow proxy

# Default block all to be sure
http_access deny all

include /etc/squid/tunning-ubuntu.conf

##end of config

after you edit the squid.conf, dont forget to chmod the storeurl-ubuntu.pl

proxy:/etc/squid# chmod a+x storeurl-ubuntu.pl
proxy:/etc/squid# squid -z
proxy:/etc/squid# /etc/init.d/squid start

voila, the lusca web/proxy server already installed on debian Lenny. And now, just configure your network to use the proxy server.