# yum -y install squid
# chkconfig squid on
# grep squid /etc/services (可略)
# semanage fcontext -l | grep squi (可略)
# getsebool -a | grep squi (可略)
// 要有 hostname 才可以把 squid 跑起來
# hostname www.vblog.tw
// 編輯設定檔
# vi /etc/squid/squid.conf
acl…
acl…
acl example src 192.168.1.0/24 // 設定連線來源的acl
acl example2 src vblog.tw // 設定連線來源的acl
acl otherguys dstdomain .yahoo.com // 設定連線目標的acl
acl otherguys dstdomain .pchome.com.tw // 設定連線目標的acl
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
// 先符合優先規則
http_access deny otherguys
http_access allow example
http_access allow example2
// 以上瀏覽器禁止連線yahoo.com, pchome.com.tw,其餘example,example2接受
# service squid start