<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>proxycache - Hamradio.my</title>
	<atom:link href="https://hamradio.my/tag/proxycache/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Amateur Radio, Tech Insights and Product Reviews</description>
	<lastBuildDate>Wed, 21 May 2025 07:05:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://hamradio.my/wp-content/uploads/2026/02/cropped-cropped-image-removebg-preview-3-32x32.png</url>
	<title>proxycache - Hamradio.my</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Set Up a Caching Proxy Server to Speed Up Your Local Network</title>
		<link>https://hamradio.my/2025/05/how-to-set-up-a-caching-proxy-server-to-speed-up-your-local-network/</link>
					<comments>https://hamradio.my/2025/05/how-to-set-up-a-caching-proxy-server-to-speed-up-your-local-network/#respond</comments>
		
		<dc:creator><![CDATA[9M2PJU]]></dc:creator>
		<pubDate>Fri, 30 May 2025 06:51:36 +0000</pubDate>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[do it yourself]]></category>
		<category><![CDATA[free open source software]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[open source operating system]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[DIYNetworking]]></category>
		<category><![CDATA[homeautomation]]></category>
		<category><![CDATA[homelab]]></category>
		<category><![CDATA[homeserver]]></category>
		<category><![CDATA[httpcaching]]></category>
		<category><![CDATA[httpsoptimization]]></category>
		<category><![CDATA[internetoptimization]]></category>
		<category><![CDATA[InternetSecurity]]></category>
		<category><![CDATA[internetspeedup]]></category>
		<category><![CDATA[linuxserver]]></category>
		<category><![CDATA[linuxtutorial]]></category>
		<category><![CDATA[networkadmin]]></category>
		<category><![CDATA[networkhacks]]></category>
		<category><![CDATA[networkperformance]]></category>
		<category><![CDATA[networksecurity]]></category>
		<category><![CDATA[networkspeed]]></category>
		<category><![CDATA[networktips]]></category>
		<category><![CDATA[networktroubleshooting]]></category>
		<category><![CDATA[proxycache]]></category>
		<category><![CDATA[proxyserver]]></category>
		<category><![CDATA[RaspberryPi]]></category>
		<category><![CDATA[selfhosted]]></category>
		<category><![CDATA[serverconfiguration]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[TechBlog]]></category>
		<category><![CDATA[techguide]]></category>
		<category><![CDATA[webproxy]]></category>
		<guid isPermaLink="false">https://hamradio.my/?p=7442</guid>

					<description><![CDATA[<p>Does your home or office internet feel sluggish, especially when multiple people are browsing? You might be surprised to learn that you can significantly improve your network&#8217;s performance by setting up a caching proxy server. In this guide, I&#8217;ll walk you through the process step-by-step. What is a Caching Proxy Server? A caching proxy server [&#8230;]</p>
<p>The post <a href="https://hamradio.my/2025/05/how-to-set-up-a-caching-proxy-server-to-speed-up-your-local-network/">How to Set Up a Caching Proxy Server to Speed Up Your Local Network</a> appeared on <a href="https://hamradio.my">Hamradio.my - Amateur Radio, Tech Insights and Product Reviews</a> by <a href="https://hamradio.my/author/9m2pju/">9M2PJU</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-"></h1>



<p class="wp-block-paragraph">Does your home or office internet feel sluggish, especially when multiple people are browsing? You might be surprised to learn that you can significantly improve your network&#8217;s performance by setting up a caching proxy server. In this guide, I&#8217;ll walk you through the process step-by-step.</p>



<h2 class="wp-block-heading" id="h-what-is-a-caching-proxy-server">What is a Caching Proxy Server?</h2>



<p class="wp-block-paragraph">A caching proxy server sits between your local network devices and the internet. It stores copies of resources (like web pages, images, and videos) that users request. When someone on your network visits a website that another user has already accessed, the proxy server delivers the cached content instead of downloading it again from the internet. This reduces bandwidth usage and improves loading times.</p>



<h2 class="wp-block-heading" id="h-benefits-of-setting-up-a-caching-proxy-server">Benefits of Setting Up a Caching Proxy Server</h2>



<ul class="wp-block-list">
<li>Faster browsing: Cached content loads much quicker than fresh downloads</li>



<li>Reduced bandwidth consumption: The same content isn&#8217;t downloaded multiple times</li>



<li>Lower latency: Local network access is always faster than internet requests</li>



<li>Works for all devices: Benefits every device on your network without configuration</li>



<li>Potential cost savings: If you have a metered connection, this reduces data usage</li>
</ul>



<h2 class="wp-block-heading" id="h-what-you-ll-need">What You&#8217;ll Need</h2>



<ul class="wp-block-list">
<li>A spare computer or Raspberry Pi (with at least 2GB RAM and 32GB storage)</li>



<li>Basic networking knowledge</li>



<li>1-2 hours of setup time</li>



<li>Squid proxy software (free and open-source)</li>
</ul>



<h2 class="wp-block-heading" id="h-step-1-choosing-and-preparing-your-hardware">Step 1: Choosing and Preparing Your Hardware</h2>



<p class="wp-block-paragraph">You don&#8217;t need powerful hardware for a home or small office caching proxy. A Raspberry Pi 4 works great for small networks (up to 10 devices), while a modest PC or old laptop can handle larger networks.</p>



<p class="wp-block-paragraph">For this tutorial, I&#8217;ll use Ubuntu Server as the operating system, but you can use any Linux distribution.</p>



<ol class="wp-block-list">
<li>Download Ubuntu Server from ubuntu.com/download/server</li>



<li>Install it on your device following the installation prompts</li>



<li>Make sure to set a static IP address during installation</li>
</ol>



<h2 class="wp-block-heading" id="h-step-2-installing-squid-proxy-server">Step 2: Installing Squid Proxy Server</h2>



<p class="wp-block-paragraph">Squid is the most popular caching proxy software. It&#8217;s powerful, reliable, and well-documented. Let&#8217;s install it:</p>



<ol class="wp-block-list">
<li>Update your system:</li>
</ol>



<pre class="wp-block-code"><code>sudo apt update
sudo apt upgrade -y
</code></pre>



<ol start="2" class="wp-block-list">
<li>Install Squid:</li>
</ol>



<pre class="wp-block-code"><code>sudo apt install squid -y
</code></pre>



<ol start="3" class="wp-block-list">
<li>Verify the installation:</li>
</ol>



<pre class="wp-block-code"><code>squid -v
</code></pre>



<p class="wp-block-paragraph">This should display the Squid version information.</p>



<h2 class="wp-block-heading" id="h-step-3-configuring-squid-for-caching">Step 3: Configuring Squid for Caching</h2>



<p class="wp-block-paragraph">The default Squid configuration works, but we need to optimize it for caching:</p>



<ol class="wp-block-list">
<li>Back up the original configuration:</li>
</ol>



<pre class="wp-block-code"><code>sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original
</code></pre>



<ol start="2" class="wp-block-list">
<li>Edit the configuration file:</li>
</ol>



<pre class="wp-block-code"><code>sudo nano /etc/squid/squid.conf
</code></pre>



<ol start="3" class="wp-block-list">
<li>Find and modify these settings (or add them if not present):</li>
</ol>



<pre class="wp-block-code"><code># Define your local network
acl localnet src 192.168.1.0/24  # Change this to match your network

# Allow access from your local network
http_access allow localnet

# Cache settings
cache_mem 512 MB  # Adjust based on your server's RAM
maximum_object_size 50 MB  # Maximum size of objects to cache
cache_dir ufs /var/spool/squid 10000 16 256  # 10GB disk cache

# Refresh patterns for different content types
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern \.(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 override-expire ignore-no-cache ignore-no-store
refresh_pattern \.(css|js)$     10080   90%     43200 override-expire ignore-no-cache ignore-no-store
refresh_pattern .               0       20%     4320
</code></pre>



<ol start="4" class="wp-block-list">
<li>Save and close the file (Ctrl+X, then Y, then Enter in nano)</li>



<li>Create the cache directory:</li>
</ol>



<pre class="wp-block-code"><code>sudo mkdir -p /var/spool/squid
sudo chown proxy:proxy /var/spool/squid
</code></pre>



<ol start="6" class="wp-block-list">
<li>Initialize the cache:</li>
</ol>



<pre class="wp-block-code"><code>sudo squid -z
</code></pre>



<ol start="7" class="wp-block-list">
<li>Restart Squid:</li>
</ol>



<pre class="wp-block-code"><code>sudo systemctl restart squid
</code></pre>



<h2 class="wp-block-heading" id="h-step-4-setting-up-your-network-to-use-the-proxy">Step 4: Setting Up Your Network to Use the Proxy</h2>



<p class="wp-block-paragraph">There are two ways to implement the proxy on your network:</p>



<h3 class="wp-block-heading" id="h-option-1-configure-each-device-manual-method">Option 1: Configure Each Device (Manual Method)</h3>



<p class="wp-block-paragraph">Configure each device to use your proxy server:</p>



<ul class="wp-block-list">
<li>Proxy Address: Your server&#8217;s IP address (e.g., 192.168.1.10)</li>



<li>Port: 3128 (Squid&#8217;s default port)</li>
</ul>



<p class="wp-block-paragraph">This approach requires setting up each device individually but gives you more control.</p>



<h3 class="wp-block-heading" id="h-option-2-configure-your-router-transparent-proxy">Option 2: Configure Your Router (Transparent Proxy)</h3>



<p class="wp-block-paragraph">This method automatically routes all web traffic through your proxy:</p>



<ol class="wp-block-list">
<li>Install additional packages:</li>
</ol>



<pre class="wp-block-code"><code>sudo apt install iptables-persistent -y
</code></pre>



<ol start="2" class="wp-block-list">
<li>Add these lines to squid.conf:</li>
</ol>



<pre class="wp-block-code"><code># Transparent proxy settings
http_port 3128 transparent
</code></pre>



<ol start="3" class="wp-block-list">
<li>Set up IP forwarding:</li>
</ol>



<pre class="wp-block-code"><code>echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
</code></pre>



<ol start="4" class="wp-block-list">
<li>Create IPTables rules:</li>
</ol>



<pre class="wp-block-code"><code>sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 3128
</code></pre>



<ol start="5" class="wp-block-list">
<li>Save the rules:</li>
</ol>



<pre class="wp-block-code"><code>sudo netfilter-persistent save
</code></pre>



<ol start="6" class="wp-block-list">
<li>On your router, set the default gateway to your proxy server&#8217;s IP address</li>
</ol>



<h2 class="wp-block-heading" id="h-step-5-testing-and-monitoring">Step 5: Testing and Monitoring</h2>



<ol class="wp-block-list">
<li>Test basic functionality by browsing from a device on your network</li>



<li>Monitor cache performance:</li>
</ol>



<pre class="wp-block-code"><code>tail -f /var/log/squid/access.log
</code></pre>



<ol start="3" class="wp-block-list">
<li>Check cache hit rate:</li>
</ol>



<pre class="wp-block-code"><code>squidclient mgr:info | grep "Hit Rate"
</code></pre>



<h2 class="wp-block-heading" id="h-advanced-optimizations">Advanced Optimizations</h2>



<p class="wp-block-paragraph">After you have the basic setup working, consider these optimizations:</p>



<h3 class="wp-block-heading" id="h-increase-cache-size">Increase Cache Size</h3>



<p class="wp-block-paragraph">If you have extra storage, increase the cache size:</p>



<pre class="wp-block-code"><code>cache_dir ufs /var/spool/squid 20000 16 256  # 20GB disk cache
</code></pre>



<h3 class="wp-block-heading" id="h-enable-https-caching">Enable HTTPS Caching</h3>



<p class="wp-block-paragraph">Modern websites use HTTPS. To cache this content:</p>



<ol class="wp-block-list">
<li>Install SSL tools:</li>
</ol>



<pre class="wp-block-code"><code>sudo apt install openssl -y
</code></pre>



<ol start="2" class="wp-block-list">
<li>Generate certificates:</li>
</ol>



<pre class="wp-block-code"><code>sudo mkdir -p /etc/squid/ssl_cert
sudo openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout /etc/squid/ssl_cert/myproxy.pem -out /etc/squid/ssl_cert/myproxy.pem
sudo chown proxy:proxy /etc/squid/ssl_cert/myproxy.pem
</code></pre>



<ol start="3" class="wp-block-list">
<li>Add to squid.conf:</li>
</ol>



<pre class="wp-block-code"><code># HTTPS caching
https_port 3129 cert=/etc/squid/ssl_cert/myproxy.pem ssl-bump intercept
acl SSL_port port 443
acl CONNECT method CONNECT
http_access allow CONNECT SSL_port localnet
ssl_bump server-first all
sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/ssl_db -M 4MB
sslcrtd_children 5
</code></pre>



<ol start="4" class="wp-block-list">
<li>Create the SSL database:</li>
</ol>



<pre class="wp-block-code"><code>sudo mkdir -p /var/lib/ssl_db
sudo chown -R proxy:proxy /var/lib/ssl_db
</code></pre>



<ol start="5" class="wp-block-list">
<li>Restart Squid:</li>
</ol>



<pre class="wp-block-code"><code>sudo systemctl restart squid
</code></pre>



<ol start="6" class="wp-block-list">
<li>Install the generated certificate on your devices as a trusted CA</li>
</ol>



<h2 class="wp-block-heading" id="h-troubleshooting-common-issues">Troubleshooting Common Issues</h2>



<ol class="wp-block-list">
<li>Squid not starting: Check logs with <code>sudo journalctl -u squid</code></li>



<li>Slow performance: Verify disk cache is working with <code>ls -la /var/spool/squid/</code></li>



<li>Websites not loading: Ensure your network configuration is correct</li>



<li>HTTPS issues: Check certificate installation</li>
</ol>



<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p class="wp-block-paragraph">Setting up a caching proxy server can significantly improve your network&#8217;s browsing experience. While the initial setup requires some technical knowledge, the long-term benefits are substantial. Your internet will feel faster, especially for frequently visited sites, and you&#8217;ll save bandwidth in the process.</p>



<p class="wp-block-paragraph">Have you set up a caching proxy server? Share your experience in the comments below!</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><em>Disclaimer: This setup is intended for home or small office networks. For enterprise environments, consider professional solutions with support contracts.</em></p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://hamradio.my/2025/05/how-to-set-up-a-caching-proxy-server-to-speed-up-your-local-network/">How to Set Up a Caching Proxy Server to Speed Up Your Local Network</a> appeared on <a href="https://hamradio.my">Hamradio.my - Amateur Radio, Tech Insights and Product Reviews</a> by <a href="https://hamradio.my/author/9m2pju/">9M2PJU</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://hamradio.my/2025/05/how-to-set-up-a-caching-proxy-server-to-speed-up-your-local-network/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
