error: "open /opt/so/saltstack/local/salt/nginx/ssl/ssl.crt: no such file or directory when trying to add cert in SOC #12402
-
Version2.4.30 Installation MethodSecurity Onion ISO image Descriptionconfiguration Installation TypeStandalone Locationother (please provide detail below) Hardware SpecsExceeds minimum requirements CPU4 RAM16GB Storage for /293G Storage for /nsm5.8TB Network Traffic Collectionspan port Network Traffic Speeds1Gbps to 10Gbps StatusNo, nginx returns "missing" Salt StatusNo, there are no failures LogsYes, there are additional clues in /opt/so/log/ (please provide detail below) DetailWhen attempting to add my cert (or key) via the SOC interface, I instantaneously receive a message that the action failed and I immediately lose connection to the SOC. I am still able to log in via console, and running so-status I see that nginx is "missing". Checking the logs, I see an error Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Update: I was able to create the directories and import the .crt and .key. However, the .crt file broke nginx. reading the logs in /opt/so/nginx/logs/error.log I see nginx was expecting "BEGIN TRUSTED CERTIFICATE". I opened the .crt in vi and edited the .crt to add the "TRUSTED" as it wasn't there before (the certificate was a .cer before). Now when I run so-status, nginx status is "Missing". Any ideas on how to get it restarted? |
Beta Was this translation helpful? Give feedback.
-
I was able to resolve this issue. I was attempting to add a chained certificate. nginx requires two absolutes when reading the certificate. first, the certificate must have -----BEGIN TRUSTED CERTIFICATE----- and -----END TRUSTED CERTIFICATE----- (my certs were being generated as -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----) for each certificate in the chain. Second, the chained certificate must be in this order, from top to bottom: |
Beta Was this translation helpful? Give feedback.
I was able to resolve this issue. I was attempting to add a chained certificate. nginx requires two absolutes when reading the certificate. first, the certificate must have -----BEGIN TRUSTED CERTIFICATE----- and -----END TRUSTED CERTIFICATE----- (my certs were being generated as -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----) for each certificate in the chain. Second, the chained certificate must be in this order, from top to bottom:
Your certificate
Intermediate certificate
Root certificate
Otherwise, nginx will crash and you'll need to revert and try again. I hope this helps other people with adding chained certificates to their SO instances. It's working like a champ now!