#nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.20.4
netmask
255.255.255.0
gateway
192.168.20.1
auto eth1
iface eth1 inet static
address 11.12.13.1
netmask
255.255.255.240
Ctrl+X -->y
Ctrl+X -->y
# /etc/init.d/networking restart
#nano /etc/resolv.conf
nameserver 192.168.20.1
#nano/etc/rc.local
iptables –t nat –A POSTROUTING –o eth0
–j MASQUERADE
iptables –t nat –A PREROUTING –s
11.12.13.0/28 –p tcp --dport 80 –j
REDIRECT
--to-port 3128
--to-port 3128
(Tulis di atas tulisan “exit 0”)
#nano /etc/sysctl.conf
(cari tulisan) #netIpv4 Forward=1 -->
hapus tanda # pada depan tulisan tersebut
#reboot
- Selanjutnya instalasi squid (dari CD)
#apt-cdrom add
#apt-get –y install squid
#cd /etc/squid
nano squid.conf
Ctrl+w -->
ketik http_port 3128
Tambahkan transparent setelah http_port 3128
Tambahkan transparent setelah http_port 3128
Ctrl+w -->
ketik insert your
(tulis dibawah insert your)
(tulis dibawah insert your)
acl
jaringan src 11.12.13.0/28
http_access allow jaringan
http_access allow jaringan
Ctrl+w -->
ketik acl connect
acl
blok dstdomain “/etc/squid/situs.txt”
http_access
deny blok
Ctrl+w -->
ketik cache_mgr
(hapus
tanda # dari tulisan webmaster + hapus tulisan webmaster)
cache_mgr ayubwahyudin@gmail.com
visible_hostname
www.gmail.com
Ctrl X-->y
nano situs.txt
#/etc/init.d/squid restart
#reboot
0 komentar:
Posting Komentar