Install Squid 2dn Tproxy Du Ubuntu
Install Squid 2dn Tproxy Du Ubuntu
Install Squid 2dn Tproxy Du Ubuntu
1 di Ubuntu
ane belom pernah pake squid dari package ubuntu, jadi ane kurang tau paket dari ubuntu
server udah support TPROXY belom.
buat install squid agar optimal bisa tweaking dulu system ubuntu anda
Code:
echo "* soft nofile 65535" >>
/etc/security/limits.conf
echo "* hard nofile 65535" >>
/etc/security/limits.conf
echo "net.ipv4.conf.all.rp_filter=0" >> /etc/sysctl.conf
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
Code:
apt-get install build-essential
apt-get install libcap-dev
Code:
wget http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE9.tar.gz
wget http://www.visolve.com/squid/tproxy4/squid-2.7s9-tproxy-4.patch
Code:
tar -zxvf squid-2.7.STABLE9.tar.gz
cd squid-2.7.STABLE9
patch -p1 < ../squid-2.7s9-tproxy-4.patch
Code:
./configure '--prefix=/usr/local/squid' \
'--enable-async-io=24' \
'--enable-storeio=ufs,aufs,null,diskd' \
'--enable-auth=basic' \
'--enable-err-languages=English' \
'--disable-ident-lookups' \
'--disable-cache-digests' \
'--enable-follow-x-forwarded-for' \
'--enable-delay-pools' \
'--enable-http-violations' \
'--enable-arp-acl' \
'--with-maxfd=65535' \
'--enable-linux-netfilter' \
'--enable-linux-tproxy' \
'--with-libcap'
make
make install
option2 diatas optional bisa ditambah/dikurangi pake option2 yang anda inginkan
Code:
http_port 8080 tansparent tproxy
max_filedescriptors 65535
Code:
ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100