My SFF server machine has been configured to speed up my digital life.
- Squid caching web proxy
- apt-cacher caching apt proxy
- BIND9 caching/local DNS server
Installing the squid web proxy
apt-get install squid squid-prefetch
You will then need to configure the ACL to allow access through the proxy from the local network.
nano /etc/squid/squid.conf
visible_hostname server1 #Line added ... http_port 8080 #Line changed ... cache_dir ufs /var/spool/squid 2000 16 256 #Line changed ... acl local src 10.0.1.0/255.255.255.0 #Line added http_access allow local #Line added
This configures the squid cache to listen on port 8080 instead of 3128, allows access from all IPs in the range 10.0.1.1 - 10.0.1.255, and sets the cache size to 2000MB. Then you need to restart the squid service:
/etc/init.d/squid restart
You can then configure your end users’ machines to use http://server1:8080/ as their internet proxy. I recommend setting this for insecure (non-SSL) traffic only as I have noticed some odd behavior with SSL proxying.
In Firefox this is dead-simple:
- Open the Preferences window from the application menu on OSX or the Options window from the Tools menu on Windows.
- Choose the Advanced section at the top, followed by the Network tab.
- Click the Settings button under the Connection header.
- Choose the “Manual configuration” radio button and enter
http://server1:8080/in the HTTP Proxy box.
Safari on OSX uses the system-wide proxy settings:
- Choose System Preferences from the Apple menu
- Click the Network item under the Internet & Network heading
- Select your primary connection, wireless or wired, from the left-hand list and click the Advanced button
- Choose the Proxies tab, choose Manually in the drop-down menu, check the box next to Web Proxy
- Enter
server1in the first box and8080in the second box