Network proxy with Squid
This applies to squid3 on ubuntu
Install ==
sudo apt-get install squid3
Configuration
- uncomment "localnet" entries acl localnet src 10.0.0.0/8 # RFC1918 possible internal network acl localnet src 172.16.0.0/12 # RFC1918 possible internal network acl localnet src 192.168.0.0/16 # RFC1918 possible internal network - uncomment http_access allow localnet
SNMP
acl snmppublic snmp_community public snmp_port 3401 snmp_access allow snmppublic localhost snmp_access deny all
snmpwalk -m /usr/share/squid3/mib.txt -v1 -c fotologro localhost:3401 .1.3.6.1.4.1.3495
If you want to access it from port 161 where you are running net-snmp:
com2sec readonly default public proxy -v1 -c public 127.0.0.1:3401 .1.3.6.1.4.1.3495
Reporting
Cacti
Troubleshooting
Client
squidclient 'http://www.nytimes.com'|less
Look for "cache" and "miss". Dynamic websites usually tell browsers not to cache their content and squid respects this (?). Forcing squid to cache those objects might cause problems on the clients, unless the remote server has ways around that built-in.