<div dir="ltr"><div class="gmail_extra">You do realize that there's nothing "weird" about p0f, right? Perhaps you should have a read over:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://lcamtuf.coredump.cx/p0f3/">http://lcamtuf.coredump.cx/p0f3/</a><br></div><div class="gmail_extra"><a href="https://blog.cloudflare.com/introducing-the-p0f-bpf-compiler/">https://blog.cloudflare.com/introducing-the-p0f-bpf-compiler/</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 30, 2017 at 11:22 AM, Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 10/30/2017 03:51 AM, Troiano Alessio wrote:<br>
<br>
> I've squid 3.5.20 running on RHEL 7.4. I have a problem to access<br>
> some websites, for example <a href="http://www.nato.int" rel="noreferrer" target="_blank">www.nato.int</a>. This website apply an<br>
> Anti-DDoS system that reset the first connection after the TCP 3-way<br>
> handshake (SYN/SYN-ACK/ACK/RST-ACK). All subsequent TCP connections<br>
> are accepted. The website administrator say's it is by design.<br>
<br>
<br>
</span><span class="gmail-">> When I browse the site with squid proxy the browser receive an "Empty<br>
> Response" squid error page (HTTP error code 502 Bad Gateway) and<br>
> doesn't do the automatic retry:<br>
<br>
</span>This is by design as well :-).<br>
<br>
We can change Squid behavior to retry connection resets, but I am sure<br>
that some folks will not like the new behavior because in _their_ use<br>
cases a retry is wasteful and/or painful. IMHO, the new behavior should<br>
be controlled by a configuration directive, possibly an ACL-driven one.<br>
<br>
Quality patches implementing the above feature should be welcomed IMO.<br>
The tip of the relevant code is probably in ERR_ZERO_SIZE_OBJECT<br>
handling inside FwdState::fail(). There is a similar code that handles<br>
persistent connection races there already, but the zero-size reply code<br>
may need a new dedicated FwdState flag to prevent infinite retry loops<br>
when the origin server is broken (a much more typical use case than the<br>
weird attempt at DDoS mitigation that you have described above).<br>
<br>
<a href="https://wiki.squid-cache.org/SquidFaq/AboutSquid#How_to_add_a_new_Squid_feature.2C_enhance.2C_of_fix_something.3F" rel="noreferrer" target="_blank">https://wiki.squid-cache.org/<wbr>SquidFaq/AboutSquid#How_to_<wbr>add_a_new_Squid_feature.2C_<wbr>enhance.2C_of_fix_something.3F</a><br>
<br>
<br>
HTH,<br>
<br>
Alex.<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
<br>
> [root@soc-pe-nagios01 ~]# wget <a href="http://www.nato.int" rel="noreferrer" target="_blank">www.nato.int</a> -e use_proxy=yes -e http_proxy=<a href="http://172.31.1.67:8080" rel="noreferrer" target="_blank">172.31.1.67:8080</a><br>
> --2017-10-30 10:41:09--  <a href="http://www.nato.int/" rel="noreferrer" target="_blank">http://www.nato.int/</a><br>
> Connecting to 172.31.1.67:8080... connected.<br>
> Proxy request sent, awaiting response... 502 Bad Gateway<br>
> 2017-10-30 10:41:09 ERROR 502: Bad Gateway.<br>
><br>
> I can't find an RFC that confirm if browser and proxyes should try a page reload, or if squid has an option to do that.<br>
><br>
> Any help is appreciated.<br>
><br>
> Best Regards, Alessio.<br>
><br>
> Il presente messaggio e-mail e ogni suo allegato devono intendersi indirizzati esclusivamente al destinatario indicato e considerarsi dal contenuto strettamente riservato e confidenziale. Se non siete l'effettivo destinatario o avete ricevuto il messaggio e-mail per errore, siete pregati di avvertire immediatamente il mittente e di cancellare il suddetto messaggio e ogni suo allegato dal vostro sistema informatico. Qualsiasi utilizzo, diffusione, copia o archiviazione del presente messaggio da parte di chi non ne è il destinatario è strettamente proibito e può dar luogo a responsabilità di carattere civile e penale punibili ai sensi di legge.<br>
> Questa e-mail ha valore legale solo se firmata digitalmente ai sensi della normativa vigente.<br>
><br>
> The contents of this email message and any attachments are intended solely for the addressee(s) and contain confidential and/or privileged information.<br>
> If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately notify the sender and then delete this message and any attachments from your system. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited. Unauthorized disclosure and/or use of information contained in this email message may result in civil and criminal liability. “<br>
> This e-mail has legal value according to the applicable laws only if it is digitally signed by the sender<br>
> ______________________________<wbr>_________________<br>
> squid-users mailing list<br>
> <a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.<wbr>org</a><br>
> <a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/<wbr>listinfo/squid-users</a><br>
><br>
<br>
______________________________<wbr>_________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.<wbr>org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/<wbr>listinfo/squid-users</a><br>
</div></div></blockquote></div><br></div></div>