Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setting ip address
- auto eth0
- iface eth0 inet dhcp
- auto eth1
- iface eth1 inet static
- address 172.16.21.1
- netmask 255.255.255.0
- restart network /etc/init.d/networking restart
- ganti repository
- nano /etc/apt/sources.list
- deb file:///media/usb/ precise main restricted
- simpan repository
- nano /etc/resolv.conf
- tulis nameserver 8.8.8.8
- mkdir /media/usb
- fdisk -l (untuk melihat kode installer) biasanya sd*1
- mount /dev/(kode installer) /media/usb
- update repository
- apt-get update
- install squid
- apt-get install squid
- pindah direcroty
- cd /etc/squid
- kalo udah di direktory squid kopi file squid.conf ke squid.conf.asli
- contoh : cp squid.conf squid.conf.asli
- lalu ls
- nano squid.conf
- tekan crtl+w search "acl localhost"
- lalu tambahkan di acl localhost
- acl tekaje src 172.16.21.0/24
- acl kata url_regex "/etc/squid/kata"
- acl web dstdomain "/etc/squid/web"
- crtl + w search !safe_port
- tambahkan
- http_access deny kata
- http_access deny web
- http_access allow tekaje
- ctrl + w search http_port 3128
- tambahkan di http_port 3128
- menjadi http_port 3128 transparent
- ctrl + w search cache_mgr
- hapus tanda # dan ganti webmaster menjadi nama sendiri
- lalu tekan ctrl+x "y" enter
- restart squid : /etc/init.d/squid restart
- tambahkan : nano kata (content)
- facebook
- download
- music
- nano web (url)
- .facebook.com
- .indowebster.com
- restart squid : /etc/init.d/squid restart
- itu squid udah selesai ! sekarang kita tiggal routing aja
- postrouting :
- echo 1 > /porc/sys/net/ipv4/ip_forward
- iptables -t nat -A POSTROUTING -s 172.16.21.0/24 (ipnetwork) -j MASQUERADE
- Prerouting :
- 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
- lihat iptables, iptables -t nat -nvL
- kalo udah masuk prerouting dan postrouting berarti udah selesai
- sekarang tinggal ganti ipdi client aja ikutin ip dari topologi yang dikasih
- contoh
- masukin ip client
- addressnya 172.16.21.xxx
- netmasnya 255.255.255.0
- gateway 172.16.21.1 (ip eht0 di server)
- DNS Server 8.8.8.8 (DNS google)
- kalo udah tinggal di test ping ping aja ya..
- 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