I'm getting an HTTP 422 error running rule-update, using an oinkcode and the Suricata engine.
Attached is the output from sostat-redacted, but the text error on rule-update is here for easy reference:
ubahmapk@so-server:~$ sudo rule-update
Thu Mar 16 23:10:59 UTC 2017
Backing up current local_rules.xml file.
Cleaning up local_rules.xml backup files older than 30 days.
Backing up current downloaded.rules file before it gets overwritten.
Cleaning up downloaded.rules backup files older than 30 days.
Backing up current local.rules file before it gets overwritten.
Cleaning up local.rules backup files older than 30 days.
ENGINE=suricata, so we'll execute PulledPork with -T -S suricata-3.2.1.
Running PulledPork.
Error 422 when fetching https://www.snort.org/rules/snortrules-snapshot-suricata-321.tar.gz.md5 at /usr/bin/pulledpork.pl line 534.
main::md5file('************************', 'snortrules-snapshot-suricata-321.tar.gz', '/tmp/', 'https://www.snort.org/rules/') called at /usr/bin/pulledpork.pl line 2006
Pulledpork.conf has
rule_url=https://www.snort.org/rules/|snortrules-snapshot.tar.gz|<oinkcode>
It looks like Pulledpork is inserting the engine version in the URL which is causing the failure. What's more, the md5 between the parenthesis above is my oinkcode (which I've redacted). That seems...odd??
Is there an option in Pulledpork I'm missing?
Thanks for any help you can provide.
JM
John Mark,
Try re-generating your oinkcode and trying rule-update again.
Thanks,
Wes
Wes,
I re-generated the oinkcode and still get the following error when running rule-update
ENGINE=suricata, so we'll execute PulledPork with -T -S suricata-3.2.1.
Running PulledPork.
Error 422 when fetching https://www.snort.org/rules/snortrules-snapshot-suricata-321.tar.gz.md5 at /usr/bin/pulledpork.pl line 534.
main::md5file('1182c57484ffddab000f336a1ba532733c853bcf', 'snortrules-snapshot-suricata-321.tar.gz', '/tmp/', 'https://www.snort.org/rules/') called at /usr/bin/pulledpork.pl line 2006
Thanks.
JM
Thank you! :-)
I was fully up to date but changing the URI to reg-rules did
the trick.
Somehow, I missed that directory path in the documentation. Should
a note about this URI path be added to the FAQ for switching between
the Snort and Suricata engines?
Thanks so much for all your help! :-)
--
Jon Mark
/* If you haven't found something strange during the day, it hasn't
been much of a day.
-- John A. Wheeler */
On Tuesday, March 21, 2017 at 5:24:49 AM UTC-5, Doug Burks wrote:
> Hi John Mark,
>
> If you haven't already, please ensure that you're running the
> latest updates by running "sudo soup".
>
> Then try updating your /etc/nsm/pulledpork/pulledpork.conf,
> changing the Snort rule_url from:
>
> https://www.snort.org/rules
>
> to:
>
> https://www.snort.org/reg-rules
>
> Then try running "sudo rule-update" again.
>
> Here's the relevant code snippet from /usr/sbin/rule-update:
>
[trim]
I'm afraid it's been long enough ago that I don't remember how that
line came to be as it was.
I do run the ET open rules as well, but I can understand that my
case was a bit of a one-off.
Thanks again for all your help.
--
JM
/* If you haven't found something strange during the day, it hasn't
been much of a day.
-- John A. Wheeler */