Friday, October 2, 2009

Squid Proxy Stuffs

grep -v -e ^\s*$ -e ^# /etc/squid/squid.conf -> Print Out Squid.conf

#usr/sbin/squidclient -h 192.168.10.35 -p 8080 mgr:info

setterm -fore green -back black -store > /dev/tty1
http://wiki.squid-cache.org/ConfigExamples/
iptables -t nat -A PREROUTING -s 192.168.10.35 -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.10.35:8080
iptables -t nat -A POSTROUTING -j MASQUERADE
http_port 192.168.10.35:8080 transparent
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.10.35:8080
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A FORWARD -s 192.168.10.218/32 -o eth0 -p tcp -m state --state NEW -m multiport --dports 593,88,53,135,137,138,42,25,110 -j ACCEPT
-A FORWARD -s 192.168.10.218/32 -o eth0 -p udp -m state --state NEW -m multiport --dports 593,88,53,135,137,138,42,25,110 -j ACCEPT

No comments: