-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 500 when fetching behind squid proxy #275
Comments
Probably want to remove your oinkcode from the description. |
Thanks for your advice vrtadmin. I removed my oinkcode from description, but I'm still having the problem. |
I'm having this same issue. Only my squid proxy generates this in the logs:
|
@eddysureda It looks like your proxy doesn't support inbound TLS. I would bet that changing your proxy environment variables to the following would fix it.
The proxy environment variables just split connections so that If you look at the pcap from
This looks almost identical to a standard HTTP request, except that it uses the If you look at the pcap from pulledpork, you can see the standard TCP 3-way handshake (same as from wget), then the client sends a Setting your proxy environment variable to |
Hi, Just to add my 2 cents here. I was having a few issues with the script. It worth noting that I'm also behind squid proxy. I was getting 400s errors when the script CONNECTS to the URLs where files were supposed to be downloaded. Looking at the code I noticed that there is a condition on where to use CONNECT or GET depending if you use a proxy or not. The script itself won't allow you to use either one of those methods. I forced the script to use GET instead of CONNECT even though I'm behind a SQUID and the condition is true and CONNECT should be used (Commented out lines 400-404). After that files were downloaded seamlessly. In my case GET was the solution, it might worth adding the option as argument or something that would let you elect which method to use (it already says May need to be addressed in the future right above though). Regards, |
@fauzigo Are you saying that pulledpork was incorrectly sending a I'd be curious to see a pcap of the 400's you were getting and one after applying your fix. |
I think I never said such thing as pulled pork did something incorrect, that would be a false allegation. What I said instead, was that the way the pulledpork.pl script was trying to pull the .gz and .gz.md5 in wasn't working of my setup, which is basically behind Squid Cache-Proxy. The script checks if you are behind a proxy by checking your ENV vars (iirc), and thereafter decides whether to use When I bypassed the check and forced the script to use The 400 errors I was getting were mostly my proxy returning codes that the It worth noting that URLs were HTTPS, not HTTP. Regards, |
Sorry, "incorrect" was my word because I thought you were saying that it was sending a The redirect to S3 shouldn't matter unless you're whitelisting specific URLs in Squid and the S3 endpoint isn't whitelisted. Squid supports all standard HTTP methods ( The only reasons I can think of that pulledpork might be working as you describe are that somehow your proxy environment variables aren't being interpreted correctly, or for some reason it is sending a In either case, it sounds like there may be a bug in there and it would be a huge help to see the proxy environment variables you're setting as well as a pcap of the connection working with your modification and failing without it. |
I have this error with PulledPork version 0.7.3 and -W option:
Checking latest MD5 for snortrules-snapshot-2990.tar.gz....
Fetching md5sum for: snortrules-snapshot-2990.tar.gz.md5
** CONNECT https://www.snort.org/rules/snortrules-snapshot-2990.tar.gz.md5?oinkcode=MYOINKCODE==> 500 Can't connect to 172.16.1.5:3128
Error 500 when fetching https://www.snort.org/reg-rules/snortrules-snapshot-2990.tar.gz.md5 at /usr/local/bin/pulledpork.pl line 547.
My environment variables are fixed as:
http_proxy=http://172.16.1.5:3128
https_proxy=https://172.16.1.5:3128
Squid version: 3.1.19 with method CONNECT allowed
when I downloaded it with wget, It was succesfully.
Here are the tcdump captures of wget and pulledpork:
pulledpork.pcap.gz
wget.pcap.gz
ah here is the squid logs too:
access.txt
The text was updated successfully, but these errors were encountered: