Inidian

Squid HTTPS

Mar 12th, 2014
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. Instalasi Squid 3 HEAD
  2. ======================
  3.  
  4. Petunjuk:
  5. --------------
  6. - Login ke Program WinSCP menggunakan user root
  7. - Copy Paste Perintah-Perintah dibawah ini melalui Putty (Copy lalu Klik kanan pada putty tekan Enter) :
  8. apt-get update
  9. apt-get install devscripts build-essential openssl libssl-dev fakeroot libcppunit-dev libsasl2-dev cdbs ccze libfile-readbackwards-perl libcap2 libcap-dev libcap2-dev sysv-rc-conf
  10.  
  11. wget http://www1.it.squid-cache.org/Versions/v3/3.HEAD/squid-3.HEAD-20130527-r12855.tar.gz
  12. tar xzvf squid-3.HEAD-20130527-r12855.tar.gz
  13.  
  14. cd squid-3.HEAD-20130527-r12855
  15.  
  16. ./configure \
  17. --prefix=/usr \
  18. --bindir=/usr/bin \
  19. --sbindir=/usr/sbin \
  20. --libexecdir=/usr/lib/squid3 \
  21. --sysconfdir=/etc/squid3 \
  22. --localstatedir=/var \
  23. --libdir=/usr/lib \
  24. --includedir=/usr/include \
  25. --datadir=/usr/share/squid3 \
  26. --infodir=/usr/share/info \
  27. --mandir=/usr/share/man \
  28. --disable-dependency-tracking \
  29. --enable-storeio=ufs,aufs,diskd \
  30. --enable-removal-policies=lru,heap \
  31. --enable-icmp \
  32. --enable-esi \
  33. --enable-icap-client \
  34. --disable-wccp \
  35. --disable-wccpv2 \
  36. --enable-kill-parent-hack \
  37. --enable-cache-digests \
  38. --enable-follow-x-forwarded-for--enable-x-accelerator-vary \
  39. --enable-zph-qos \
  40. --with-default-user=proxy \
  41. --with-logdir=/var/log/squid3 \
  42. --with-pidfile=/var/run/squid3.pid \
  43. --with-large-files \
  44. --enable-ltdl-convenience \
  45. --with-filedescriptors=65536 \
  46. --enable-ssl \
  47. --enable-ssl-crtd \
  48. --disable-auth \
  49. --build=i486-linux-gnu build_alias=i486-linux-gnu
  50.  
  51. make && make install
  52.  
  53. chown -R proxy:proxy /cache1
  54. chown -R proxy:proxy /var/log/squid3
  55.  
  56. ## Copy 2 file berikut menggunakan Program WinSCP
  57. =================================================
  58. - File "squid.conf" (sila download di http://pastebin.com/PKZkLfpD) yang telah diubah dan disesuaikan dengan kebutuhan ke folder: /etc/squid3/
  59. - File "squid" (sila download di http://pastebin.com/8xLYXZQC)ke folder: /etc/init.d/
  60.  
  61. ijin execute squid
  62. ==========================
  63. chmod +x /etc/init.d/squid
  64.  
  65. Setup SSL Bump
  66. ==============
  67.  
  68. cd /etc/squid3
  69. mkdir ssl_cert
  70. cd ssl_certopenssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout myCA.pem -outmyCA.pemopenssl x509 -in myCA.pem -outform DER -out myCA.der
  71. chown -R nobody /var/squid3/lib/ssl_db//usr/lib/squid3/ssl_crtd -c -s /var/squid3/lib/ssl_db/certs
  72.  
  73. swap dir
  74. ========
  75. squid -z
  76.  
  77. Copy Paste Perintah-Perintah dibawah ini pada file /etc/rc.local
  78. ================================================================
  79.  
  80. modprobe xt_TPROXY
  81. modprobe xt_socket
  82. modprobe nf_tproxy_core
  83. modprobe xt_mark
  84. modprobe nf_nat
  85. modprobe nf_conntrack_ipv4
  86. modprobe nf_conntrack
  87. modprobe nf_defrag_ipv4
  88. modprobe ipt_REDIRECT
  89. modprobe iptable_nat
  90.  
  91. iptables -t mangle -F
  92. iptables -t mangle -X
  93. iptables -t mangle -N DIVERT
  94. iptables -t mangle -A DIVERT -j MARK --set-mark 1
  95. iptables -t mangle -A DIVERT -j ACCEPT
  96. iptables -t mangle -A INPUT -j ACCEPT
  97. iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
  98. iptables -t mangle -A PREROUTING ! -d 192.168.5.2/32 -p tcp --dport 80 -j TPROXY--tproxy-mark 0x1/0x1 --on-port 3129
  99.  
  100. /sbin/ip rule add fwmark 1 lookup 100
  101. /sbin/ip route add local 0.0.0.0/0 dev lo table 100
  102.  
  103. echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
  104. echo 1 > /proc/sys/net/ipv4/ip_forward
  105. exit 0
  106. ---------------------------------------------------------------------------------------------
  107. Selesai. Hasil test bisa dilihat disini >>
  108. http://www.flickr.com/photos/96503603@N07/
Advertisement
Add Comment
Please, Sign In to add comment