i know that. <br>i want to somehow change source code of squid to accept packet from nfqueue, to customize netfilter packet flow for my application(squid). <br><br>is it possible!? <br><br>Sent from my Huawei Mobile<div class="quote" style="line-height: 1.5"><br><br>-------- Original Message --------<br>Subject: Re: [NOC] Using Nfqueue or DAQ in squid<br>From: Amos Jeffries <squid3@treenet.co.nz><br>To: morteza omidian <morteza1131@gmail.com>,Squid noc <noc@lists.squid-cache.org><br>CC: <br><br><br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In future please direct questions about Squid usage to the Vendor that<br>supplied your proxy, or the squid-users mailing list. This noc@ list is<br>for the squid-cache.org domain administrators.<br><br>Replies to this mail have been set to the squid-users mailing list, so<br>if you have any followup please ensure you are subscribed there.<br><br><br>On 11/09/18 2:54 AM, morteza omidian wrote:<br>> Hi<br>> i am in a dire need about using squid in my Linux iptables firewall as a<br>> transparent proxy. in my situation, i want squid to place after my<br>> forwards iptables rules, and redirect packets to the input chain does<br>> not work for me. my packet flow is : prerouting  >  Nat  > forward  ><br>> squid > post routing<br>> <br>> the important part is that forward rules must check before packets<br>> forwards to squid. i don't want packets destinate to input chain of<br>> firewall.<br>> <br>> i thought maybe its possible to use DAQ ,like the way snort use or<br>> nfqueue in iptables. i need some help about that, please help me if its<br>> possible or *there are any other ways* to solve it .<br>> <br>> thanks a lot.<br>> <br><br>What you are asking for is not possible. Please see the netfilter packet<br>flow diagram at<br><https://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg><br>for reference.<br><br>In that diagram Squid is the "Application Layer" part of the forward<br>path. Snort, nfqueue etc by comparison are part of the "network layer"<br>or "link layer". Their actions and involvement in the traffic is quite<br>different from Squid and other application layer software.<br><br><br>It sounds to me like you are attempting to intercept traffic in the<br>OUTPUT path. For that situation follow the Localhost interception<br>example at<br><https://wiki.squid-cache.org/ConfigExamples/Intercept/LinuxLocalhost><br><br>If that is not suitable, then please mention (on the squid-users-mailing<br>list) what your problem is, and what you have tried already. Someone<br>could point you at the specific config to use that meets your situation.<br><br><br>Amos Jeffries<br>The Squid Software Foundation<br><br></blockquote></div>