Advertisement
mqnoy

proxy

Oct 30th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. setting ip address
  2. auto eth0
  3. iface eth0 inet dhcp
  4.  
  5. auto eth1
  6. iface eth1 inet static
  7. address 172.16.21.1
  8. netmask 255.255.255.0
  9.  
  10. restart network /etc/init.d/networking restart
  11.  
  12. ganti repository
  13. nano /etc/apt/sources.list
  14. deb file:///media/usb/ precise main restricted
  15. simpan repository
  16.  
  17. nano /etc/resolv.conf
  18. tulis nameserver 8.8.8.8
  19.  
  20. mkdir /media/usb
  21. fdisk -l (untuk melihat kode installer) biasanya sd*1
  22. mount /dev/(kode installer) /media/usb
  23. update repository
  24. apt-get update
  25.  
  26. install squid
  27. apt-get install squid
  28.  
  29. pindah direcroty
  30. cd /etc/squid
  31.  
  32. kalo udah di direktory squid kopi file squid.conf ke squid.conf.asli
  33. contoh : cp squid.conf squid.conf.asli
  34. lalu ls
  35.  
  36. nano squid.conf
  37.  
  38. tekan crtl+w search "acl localhost"
  39. lalu tambahkan di acl localhost
  40. acl tekaje src 172.16.21.0/24
  41. acl kata url_regex "/etc/squid/kata"
  42. acl web dstdomain "/etc/squid/web"
  43.  
  44. crtl + w search !safe_port
  45. tambahkan
  46. http_access deny kata
  47. http_access deny web
  48. http_access allow tekaje
  49.  
  50. ctrl + w search http_port 3128
  51. tambahkan di http_port 3128
  52. menjadi http_port 3128 transparent
  53.  
  54. ctrl + w search cache_mgr
  55. hapus tanda # dan ganti webmaster menjadi nama sendiri
  56.  
  57. lalu tekan ctrl+x "y" enter
  58.  
  59. restart squid : /etc/init.d/squid restart
  60.  
  61. tambahkan : nano kata (content)
  62. facebook
  63. download
  64. music
  65.  
  66. nano web (url)
  67. .facebook.com
  68. .indowebster.com
  69. restart squid : /etc/init.d/squid restart
  70.  
  71. itu squid udah selesai ! sekarang kita tiggal routing aja
  72.  
  73. postrouting :
  74. echo 1 > /porc/sys/net/ipv4/ip_forward
  75. iptables -t nat -A POSTROUTING -s 172.16.21.0/24 (ipnetwork) -j MASQUERADE
  76.  
  77. Prerouting :
  78. iptables -t nat -A PREROUTING -s 172.16.21.0/24 (ipnetwork) -p tcp --dport 80 -j DNAT --to 172.16.21.1 (ipeth1):3128
  79.  
  80. lihat iptables, iptables -t nat -nvL
  81. kalo udah masuk prerouting dan postrouting berarti udah selesai
  82.  
  83. sekarang tinggal ganti ipdi client aja ikutin ip dari topologi yang dikasih
  84. contoh
  85. masukin ip client
  86. addressnya 172.16.21.xxx
  87. netmasnya 255.255.255.0
  88. gateway 172.16.21.1 (ip eht0 di server)
  89.  
  90. DNS Server 8.8.8.8 (DNS google)
  91.  
  92. kalo udah tinggal di test ping ping aja ya..
  93.  
  94. cek akses proxy buka web browsernya. buka facebook.com atau indowebster.com kalo udah ke blok berarti proxy sukses dan keluar ruangan teriak GUA BERHASIL !
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement