internet
|
eth0
(squid+routing)
eth1
|
client
perintah iptables untuk routing
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
perintah iptables untuk proxy automatis
iptables -t nat -I PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
acl all src all
acl localnet src 192.168.1.0/24
acl situs url_regex -i "/etc/squid/terlarang"
acl SSL_ports port 443 563
acl safe_ports port 80 443 563
http_access deny situs
http_access allow localnet
http_port 3128 transparent
cache_access_log /var/log/squid/access.log
visible_hostname dias@www.sekolah.sch.id
cache_mgr dias
nano /etc/squid/terlarang
mkdir /cache
chown -R proxy:proxy /cache
chown -R proxy:proxy /etc/squid/terlarang
/etc/init.d/squid stop
squid -z
/etc/init.d/squid start
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables-save > /etc/dias
nano /etc/init.d/rc.local
iptables-restore < /etc/dias
/etc/init.d/squid restart
buat mengecek proxy
download terlebih dahulu squidnya
wget http://lusca-ku.googlecode/files/squid
cp squid /etc/init.d/squid
chmod 777 /etc/init.d/squid
start restart
0 comments:
Posting Komentar