<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Squid - bypass transparent proxy when going through IPsec {SOLVED}]]></title><description><![CDATA[<p dir="auto">I'm running pfSense 1.2RC2 with squid in transparent mode.</p>
<ol>
<li>
<p dir="auto">How do I disable the forwarding of port 80 to squid if destination host is on a private subnet (not on LAN, accessed via IPSec tunnel)?</p>
</li>
<li>
<p dir="auto">How do I exclude certain source IP's from being forwarded to squid?</p>
</li>
</ol>
<p dir="auto">Any hints much appreciated.</p>
<p dir="auto">thanks!</p>
<p dir="auto"><em><strong>updated</strong></em><br />
3) is squid.inc the only place I need to edit to accomplish point #1 and #2?</p>
<p dir="auto">switch($type) {<br />
case 'nat':<br />
foreach ($ifaces as $iface){<br />
$rules .= "# Setup Squid proxy redirect\n";<br />
$rules .= "rdr on $iface proto tcp from any to !($iface) port 80 -&gt; 127.0.0.1 port 80\n";<br />
$rules .= "\n";<br />
};<br />
break;<br />
case 'filter':<br />
foreach ($ifaces as $iface){<br />
$rules .= "# Setup squid pass rules for proxy\n";<br />
$rules .= "pass in quick on $iface proto tcp from any to !($iface) port 80 flags S/SA keep state\n";<br />
$rules .= "pass in quick on $iface proto tcp from any to !($iface) port $port flags S/SA keep state\n";<br />
$rules .= "\n";<br />
};<br />
break;</p>
<p dir="auto">***** Solved:</p>
<ol>
<li>created two aliases dontProxySRC and dontProxyDST using WebGUI</li>
<li>created fake rule using aliases from #1 to force pfsense to setup a pf table</li>
<li>replaced nat case in file /usr/local/pkg/squid.inc with the following:</li>
</ol>
<p dir="auto">case 'nat':<br />
foreach ($ifaces as $iface){<br />
$rules .= "# Setup Squid proxy redirect\n";<br />
                        $rules .= "no rdr on $iface proto tcp from &lt;dontproxysrc&gt;to  any port 80\n";<br />
                        $rules .= "no rdr on $iface proto tcp from any to &lt;dontproxydst&gt;port 80\n";<br />
$rules .= "rdr on $iface proto tcp from any to !($iface) port 80 -&gt; 127.0.0.1 port 80\n";<br />
$rules .= "\n";<br />
};<br />
break;&lt;/dontproxydst&gt;&lt;/dontproxysrc&gt;</p>
]]></description><link>https://forum.netgate.com/topic/6044/squid-bypass-transparent-proxy-when-going-through-ipsec-solved</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 00:21:15 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/6044.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Oct 2007 10:52:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Squid - bypass transparent proxy when going through IPsec {SOLVED} on Mon, 29 Oct 2007 13:23:53 GMT]]></title><description><![CDATA[<p dir="auto">I added an option to let squid NOT redirect RFC1918 subnets…</p>
<p dir="auto">just reinstall the package and have a look :-)</p>
]]></description><link>https://forum.netgate.com/post/161183</link><guid isPermaLink="true">https://forum.netgate.com/post/161183</guid><dc:creator><![CDATA[trendchiller]]></dc:creator><pubDate>Mon, 29 Oct 2007 13:23:53 GMT</pubDate></item><item><title><![CDATA[Reply to Squid - bypass transparent proxy when going through IPsec {SOLVED} on Mon, 29 Oct 2007 02:05:41 GMT]]></title><description><![CDATA[<p dir="auto">Dear Mrsense,</p>
<p dir="auto">Thank you so much, it works and solves my problem.</p>
<p dir="auto">:D :-*</p>
]]></description><link>https://forum.netgate.com/post/161171</link><guid isPermaLink="true">https://forum.netgate.com/post/161171</guid><dc:creator><![CDATA[dogz]]></dc:creator><pubDate>Mon, 29 Oct 2007 02:05:41 GMT</pubDate></item><item><title><![CDATA[Reply to Squid - bypass transparent proxy when going through IPsec {SOLVED} on Sat, 27 Oct 2007 00:51:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi dogz.</p>
<p dir="auto">I noticed that pfsense would not setup pf table unless alias is used by one of the rules.  Therefore you'll need to create a rule that uses particular alias(es) (in this case DontProxyDST and DontProxySRC).  The examples that you gave would work but I feel that a rule created for the sole purpose of making sure that pf table has been created should not do anything important (hence I called it a "fake" rule).  For example you could setup a LAN rule to pass TCP protocol with source DontProxySRC and destination DontProxyDST on port 80.</p>
<p dir="auto">PFsense will not allow an alias to have no records.  If you don't want to use one of the aliases you might consider to either omit the line that is using it:<br />
$rules .= "no rdr on $iface proto tcp from &lt;dontproxysrc&gt;to  any port 80\n";<br />
or<br />
$rules .= "no rdr on $iface proto tcp from any to &lt;dontproxydst&gt;port 80\n";</p>
<p dir="auto">or fill it in with a private IP address that does not belong to your network. For example, if you don't use private class B subnet you could enter 172.17.1.1&lt;/dontproxydst&gt;&lt;/dontproxysrc&gt;</p>
]]></description><link>https://forum.netgate.com/post/161076</link><guid isPermaLink="true">https://forum.netgate.com/post/161076</guid><dc:creator><![CDATA[mrsense]]></dc:creator><pubDate>Sat, 27 Oct 2007 00:51:04 GMT</pubDate></item><item><title><![CDATA[Reply to Squid - bypass transparent proxy when going through IPsec {SOLVED} on Fri, 26 Oct 2007 23:30:17 GMT]]></title><description><![CDATA[<p dir="auto">HI MrSense,</p>
<p dir="auto">Thank you for your help.<br />
Forgive my poor English, would you please tell me how to "created fake rule using aliases from #1 to force pfsense to setup a pf table" ?</p>
<p dir="auto">Do you mean that I create two rules, one is from dontProxySRC to any in LAN interface, another is from any to dontProxyDST ?</p>
<p dir="auto">if one of aliases is blank without any records, will this modification get wrong ?</p>
<p dir="auto">Please advise me.<br />
Thank you in advance.</p>
]]></description><link>https://forum.netgate.com/post/161072</link><guid isPermaLink="true">https://forum.netgate.com/post/161072</guid><dc:creator><![CDATA[dogz]]></dc:creator><pubDate>Fri, 26 Oct 2007 23:30:17 GMT</pubDate></item></channel></rss>