<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.skytech.dk/index.php?action=history&amp;feed=atom&amp;title=Squid_proxy_remote_server</id>
	<title>Squid proxy remote server - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.skytech.dk/index.php?action=history&amp;feed=atom&amp;title=Squid_proxy_remote_server"/>
	<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;action=history"/>
	<updated>2026-04-03T17:43:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;diff=1646&amp;oldid=prev</id>
		<title>192.168.0.250 at 20:00, 10 April 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;diff=1646&amp;oldid=prev"/>
		<updated>2011-04-10T20:00:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:00, 10 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Categor&lt;/del&gt;:Linux]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Category&lt;/ins&gt;:Linux]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Howto run transparant proxy on same network on seperate server =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Howto run transparant proxy on same network on seperate server =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>192.168.0.250</name></author>
	</entry>
	<entry>
		<id>https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;diff=1645&amp;oldid=prev</id>
		<title>192.168.0.250 at 20:00, 10 April 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;diff=1645&amp;oldid=prev"/>
		<updated>2011-04-10T20:00:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:00, 10 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Categor:Linux]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Howto run transparant proxy on same network on seperate server =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Howto run transparant proxy on same network on seperate server =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>192.168.0.250</name></author>
	</entry>
	<entry>
		<id>https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;diff=1644&amp;oldid=prev</id>
		<title>192.168.0.250: Created page with &quot;= Howto run transparant proxy on same network on seperate server = This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html All credits goes there...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Squid_proxy_remote_server&amp;diff=1644&amp;oldid=prev"/>
		<updated>2011-04-10T20:00:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Howto run transparant proxy on same network on seperate server = This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html All credits goes there...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Howto run transparant proxy on same network on seperate server =&lt;br /&gt;
This is a blatant ripoff from this source: http://tldp.org/HOWTO/TransparentProxy-6.html&lt;br /&gt;
All credits goes there. I just spent a long time to find it, so reposted here for easy access again.&lt;br /&gt;
&lt;br /&gt;
== Chapter 6 ==&lt;br /&gt;
=== 6. Transparent Proxy to a Remote Box ===&lt;br /&gt;
&lt;br /&gt;
Now, the question naturally arises, if we can do all this nifty stuff redirecting HTTP connections to local ports, could we do the same thing but to a remote box (e.g., the machine with squid running is not the same machine as iptables is running on). The answer is yes, but it takes a little different magic words. If you only want to redirect to the local box (the normal case), skip this section.&lt;br /&gt;
&lt;br /&gt;
For the purposes of example commands, let&amp;#039;s assume we have two boxes called squid-box and iptables-box, and that they are on the network local-network. In the commands below, replace these strings with the actual IP addresses or name of your machines and network.&lt;br /&gt;
&lt;br /&gt;
I will present two different approaches here.&lt;br /&gt;
&lt;br /&gt;
=== 6.1 First method (simpler, but does not work for some esoteric cases) ===&lt;br /&gt;
&lt;br /&gt;
First, we need to machine that squid will be running on, squid-box. You do not need iptables or any special kernel options on this machine, just squid. You *will*, however, need the &amp;#039;http_accel&amp;#039; options as described above. (Previous version of this HOWTO suggested that you did not need those options. That was a mistake. Sorry to have confused people...)&lt;br /&gt;
&lt;br /&gt;
Now, the machine that iptables will be running on, iptables-box You will need to configure the kernel as described in section 3 above, except that you don&amp;#039;t need the REDIRECT target support). Now, for the iptables commands. You need three:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -t nat -A PREROUTING -i eth0 -s ! squid-box -p tcp --dport 80 -j DNAT --to squid-box:3128&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -s local-network -d squid-box -j SNAT --to iptables-box&lt;br /&gt;
iptables -A FORWARD -s local-network -d squid-box -i eth0 -o eth0 -p tcp --dport 3128 -j ACCEPT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first one sends the packets to squid-box from iptables-box. The second makes sure that the reply gets sent back through iptables-box, instead of directly to the client (this is very important!). The last one makes sure the iptables-box will forward the appropriate packets to squid-box. It may not be needed. YMMV. Note that we specified &amp;#039;-i eth0&amp;#039; and then &amp;#039;-o eth0&amp;#039;, which stands for input interface eth0 and output interface eth0. If your packets are entering and leaving on different interfaces, you will need to adjust the commands accordingly.&lt;br /&gt;
&lt;br /&gt;
Add these commands to your appropriate startup scripts under /etc/rc.d/&lt;br /&gt;
&lt;br /&gt;
(Thanks to Giles Coochey for help writing this section).&lt;/div&gt;</summary>
		<author><name>192.168.0.250</name></author>
	</entry>
</feed>