This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
web_services:squid_update_cache [2015/01/28 13:55] tschulz [Edit **/etc/squid/storeid_rewrite.conf] |
web_services:squid_update_cache [2015/02/21 11:33] tschulz [Edit /etc/sysctl.conf] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Squid Based Update Cache (Ubuntu 12.04) ====== | + | ====== Squid Based Update Cache (Ubuntu 14.04) ====== |
===== Setup ===== | ===== Setup ===== | ||
==== Compile Squid ==== | ==== Compile Squid ==== | ||
Line 17: | Line 17: | ||
chown -R proxy:proxy /var/spool/squid/ | chown -R proxy:proxy /var/spool/squid/ | ||
</file> | </file> | ||
- | {{:web_services:squid_pkg.tar.tar|Script from Ubuntu squid package (extract to /etc)}} | + | ==== Install missing scripts and configs from Debian/Ubuntu Package ==== |
+ | {{:web_services:squid_pkg.tar|Script from Ubuntu squid package (extract to /etc)}} | ||
+ | <file> | ||
+ | cd | ||
+ | wget http://wiki.sebeka.k12.mn.us/_media/web_services:squid_pkg.tar | ||
+ | tar xvpf squid_pkg.tar.tar -C / | ||
+ | </file> | ||
==== Edit /etc/sysctl.conf ==== | ==== Edit /etc/sysctl.conf ==== | ||
- add the following to **/etc/sysctl.conf**. This will enable packet forwarding | - add the following to **/etc/sysctl.conf**. This will enable packet forwarding | ||
- | <file>net.ipv6.conf.all.forwarding=1</file> | + | <file>net.ipv4.ip_forward=1</file> |
==== Edit /etc/rc.local ==== | ==== Edit /etc/rc.local ==== | ||
- | Change 999.999.999.999 to the local ip of squid server. This will redirect every port 80 request through squid. | + | * Change **999.999.999.999** to the local ip of squid server. This will redirect every **port 80** request through squid. |
+ | * In this example we are using **port 3129** as a transparent proxy port | ||
<file>iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 999.999.999.999:3129</file> | <file>iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 999.999.999.999:3129</file> | ||
==== Edit /etc/squid/squid.conf ==== | ==== Edit /etc/squid/squid.conf ==== | ||
Line 119: | Line 126: | ||
^http:\/\/[^\.]+\.c\.android\.clients\.google\.com\/(.*) http://androidupdates.google.squid.internal/$1 | ^http:\/\/[^\.]+\.c\.android\.clients\.google\.com\/(.*) http://androidupdates.google.squid.internal/$1 | ||
</file> | </file> | ||
- | ===== Test storeid_rewrite ===== | + | ===== Misc Notes ===== |
+ | |||
+ | ==== Test storeid_rewrite ==== | ||
<file> | <file> | ||
echo "<URL>" | /usr/lib/squid/storeid_file_rewrite /etc/squid/storeid_rewrite.conf | echo "<URL>" | /usr/lib/squid/storeid_file_rewrite /etc/squid/storeid_rewrite.conf | ||
Line 126: | Line 135: | ||
- | ====== Setting Proxy Server for Updates ====== | + | ===== Setting Proxy Server for Updates ===== |
If you use transparent filter you don't need to worry about proxy server settings | If you use transparent filter you don't need to worry about proxy server settings | ||
- | ===== Linux ===== | + | ==== Linux ==== |
- **http_proxy** or **https_proxy** set to another proxy server (this can also be used set a proxy server for apt updates) | - **http_proxy** or **https_proxy** set to another proxy server (this can also be used set a proxy server for apt updates) | ||
- | ===== Windows Update ===== | + | ==== Windows Update ==== |
- Use **proxycfg** to set proxy server for windows update <file>proxycfg -p proxyservername:portnumber</file> | - Use **proxycfg** to set proxy server for windows update <file>proxycfg -p proxyservername:portnumber</file> | ||
- | ===== iOS (iPad/iPod/iPhone) ===== | + | ==== iOS (iPad/iPod/iPhone) ==== |
- iOS uses what ever proxy setting that is set in the **Settings** App | - iOS uses what ever proxy setting that is set in the **Settings** App | ||
- | ===== Android ===== | + | ==== Android ==== |
- App updates/downloads **can't** be cached. | - App updates/downloads **can't** be cached. | ||
- | ===== Steam Updates ===== | + | ==== Steam Updates ==== |
- Steam will not use a proxy | - Steam will not use a proxy | ||
- | ===== ChromeOS ===== | + | ==== ChromeOS ==== |
- ChromeOS's proxy can be set in the settings of each ChromeOS device or in the administrative control panel under: | - ChromeOS's proxy can be set in the settings of each ChromeOS device or in the administrative control panel under: | ||
* **Device Management** -> **Chrome** -> **Network** | * **Device Management** -> **Chrome** -> **Network** |